Data redistribution method and device
A technology of redistribution and data, applied in the field of data redistribution control, can solve the problems of high overhead and low efficiency of data redistribution processing methods, and achieve the effects of improving efficiency, reducing system overhead, and reducing data migration.
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
Embodiment 1
[0030] In order to solve the problem of inefficiency caused by creating a new table in the prior art, the core idea of this embodiment is to create a rule table according to the new fragmentation rule after receiving the data redistribution request, and save the fragmentation in the rule table. Shard key and metadata information. The so-called metadata information refers to the node information corresponding to the shard key data. For example, there are 3 nodes, which can be represented by 1, 2, and 3 respectively. Before the redistribution task ends, the computing nodes of the distributed database access data according to the old table. After the redistribution task ends, the computing nodes access data according to the rule table.
[0031] See figure 1 , the data redistribution method involved in this embodiment includes:
[0032] Step 102: In response to the data redistribution request sent by the computing node, create a rule table corresponding to the request according...
Embodiment 2
[0039] See figure 2 , the data redistribution method involved in this embodiment may include:
[0040] Step 202: Create a rule table.
[0041] After a data redistribution request is initiated, a new rule table is created based on the original table information. The sharding key of the new rule table is the same as the sharding method of the original table in the redistribution request. For example, the original table is hashed to 3 according to the field col1 On the node, redistribution requires hashing to 4 nodes, and the rule table is hashed to 4 nodes according to the field col1.
[0042] In this embodiment, the redistribution of changing the distribution mode from 3 nodes to 4 nodes is taken as an example for illustration. The original table name is tbs_info_detail, and the distribution mode is hash(uuid)(g1,g2,g3). The processor creates a hidden rule table tbs_info_detail_res_rule, and the distribution mode is hash(uuid)(g1,g2,g3,g4). There are two fields in the rule ...
Embodiment 3
[0065] See image 3 , the data redistribution device 300 involved in this embodiment includes:
[0066] computing node 301 , processor 302 and storage node 303 . The processor 302 is configured to respond to the data redistribution request sent by the computing node 301, and create a rule table corresponding to the request according to the original table information. There are multiple storage nodes 303, which are used to generate rule table data and send them to the storage node 303 corresponding to the rule table data, import the rule table data into the rule table, and complete the data of the rule table according to the original table. The computing node 301 is configured to access data in the form of a rule table.
[0067] The data redistribution device provided by Embodiment 3 of the present invention migrates data by creating a rule table instead of creating a new table, thereby improving the efficiency of data redistribution and reducing the impact of data migration....
PUM
Login to View More Abstract
Description
Claims
Application Information
Login to View More 


