Partition Extension Method and Apparatus
First Claim
1. A method for extending N data node devices included in a distributed storage system, which further includes a server, wherein the server stores a hash ring of data nodes organized according to a distributed hash table (DHT), wherein the hash ring includes a plurality of partitions, and wherein each partition is mapped to a data node, the method performed by the server comprising:
- receiving an instruction of adding X new data nodes into the distributed storage system, wherein X is not less than 1;
obtaining M of the partitions included in the hash ring;
determining that M/(N+X) is lower than a preset threshold;
generating new partitions by multiplying and mapping partitions to each data node, based upon the determination;
storing mapping relationship between the new partitions and the X new data nodes; and
adding the X new data nodes into the distributed storage system.
2 Assignments
0 Petitions
Accused Products
Abstract
In a distributed storage system, a method for extending a number N of data node devices comprises a server receives an instruction of adding X new data nodes into the distributed storage system. Then, the server obtains a number M of the all partitions included in a hash ring and determines that M/(N+X) is lower than a preset threshold. The hash ring is organized according to a distributed hash table (DHT), and includes a plurality of partitions. Each partition is mapping to a data node. Based upon the determination, the server generates new partitions by multiplying partitions mapping to each data node, based upon the determination. After storing mapping relationship between the new partitions and the X new data nodes, the server adds the X new data nodes into the distributed storage system.
-
Citations
6 Claims
-
1. A method for extending N data node devices included in a distributed storage system, which further includes a server, wherein the server stores a hash ring of data nodes organized according to a distributed hash table (DHT), wherein the hash ring includes a plurality of partitions, and wherein each partition is mapped to a data node, the method performed by the server comprising:
-
receiving an instruction of adding X new data nodes into the distributed storage system, wherein X is not less than 1; obtaining M of the partitions included in the hash ring; determining that M/(N+X) is lower than a preset threshold; generating new partitions by multiplying and mapping partitions to each data node, based upon the determination; storing mapping relationship between the new partitions and the X new data nodes; and adding the X new data nodes into the distributed storage system. - View Dependent Claims (2)
-
-
3. A method for migrating data from a data node to a newly added data node in a distributed storage system which includes a plurality of data nodes and a server, wherein the server stores a hash ring of the data nodes organized according to a distributed hash table (DHT), wherein the hash ring includes a plurality of partitions, the method performed by the server comprising:
-
obtaining data stored in an original data node included in the distributed storage system, wherein the original data node is corresponding to at least one first partition which are a part of the partitions included in the hash ring; receiving an instruction of adding at least one new data node into the distributed storage system; generating at least one second partition by multiplying the first partitions; adding the second partitions into the hash ring; storing mapping relation between the second partitions and the new data nodes; adding the new data nodes into the distributes storage system; generating a key by performing a hashing operation on the data; applying the key to the hash ring added the second partitions to identify a matching partition; determining a target data node from the new data nodes, wherein the target data node is corresponding to the matching partition, based upon the matching partition and the mapping relation; and migrating the data from the original data node to the target data node.
-
-
4. A server in a distributed storage system which includes N data nodes, comprising:
-
a memory configured to store a hash ring of data nodes organized according to a distributed hash table (DHT), wherein the hash ring includes a plurality of partitions, and wherein each partition is mapped to a data node; and a processor configured to; receive an instruction of adding X new data nodes into the distributed storage system, wherein X is not less than 1; obtain M of the partitions included in the hash ring; determine that M/(N+X) is lower than a preset threshold; generate new partitions by multiplying and mapping partitions to each data node, based upon the determination; store mapping relationship between the new partitions and the X new data nodes; and add the X new data nodes into the distributed storage system. - View Dependent Claims (5)
-
-
6. A server in a distributed storage system which includes a plurality of data nodes, comprising:
-
a memory configured to store a hash ring of the data nodes organized according to a distributed hash table (DHT), wherein the hash ring includes a plurality of partitions; and a processor configured to; obtain data stored in an original data node included in the distributed storage system, wherein the original data node is corresponding to at least one first partition which are a part of the partitions included in the hash ring; receive an instruction of adding at least one new data node into the distributed storage system; generate at least one second partition by multiplying the first partitions; add the second partitions into the hash ring; store mapping relation between the second partitions and the new data nodes; add the new data nodes into the distributes storage system; generate a key by performing a hashing operation on the data; apply the key to the hash ring added the second partitions to identify a matching partition; determine a target data node from the new data nodes, wherein the target data node is corresponding to the matching partition, based upon the matching partition and the mapping relation; and migrate the data from the original data node to the target data node.
-
Specification