Data processing method and apparatus
First Claim
Patent Images
1. A data processing method, which is applied to a partition management device that manages storage disks in a cluster by current partitions, the method comprising:
- storing, by the partition management device, a partition view that maps an ID of a current partition to an address of a storage disk;
obtaining a key from key-value data that comprises a value and the key corresponding to the value, and calculating, according to the key, an ID of a final partition that corresponds to the key-value data, wherein the key-value data comprises a value and the key corresponding to the value;
calculating an ID of the current partition that corresponds with the IDs of the final partition, wherein the ID of current partition corresponds with a plurality of IDs of final partitions, wherein a total quantity of current partitions is less than a total quantity of final partitions;
searching the partition view to obtain an address of a storage disk that is corresponding to the ID of the current partition; and
generating a key-value packet by using the address of the storage disk as a destination address, and sending the key-value packet to the storage disk, wherein the key-value packet carries the key-value data.
2 Assignments
0 Petitions
Accused Products
Abstract
A data processing technology is provided, and is applied to a partition management device. The partition management device stores a partition view, the partition view records a correspondence between an ID of a current partition and an address of a storage disk, and a total quantity of current partitions may be less than a total quantity of final partitions. By using the technology, data forwarding may be performed on key-value data by using a current partition, thereby reducing complexity of a partition view.
35 Citations
16 Claims
-
1. A data processing method, which is applied to a partition management device that manages storage disks in a cluster by current partitions, the method comprising:
-
storing, by the partition management device, a partition view that maps an ID of a current partition to an address of a storage disk; obtaining a key from key-value data that comprises a value and the key corresponding to the value, and calculating, according to the key, an ID of a final partition that corresponds to the key-value data, wherein the key-value data comprises a value and the key corresponding to the value; calculating an ID of the current partition that corresponds with the IDs of the final partition, wherein the ID of current partition corresponds with a plurality of IDs of final partitions, wherein a total quantity of current partitions is less than a total quantity of final partitions; searching the partition view to obtain an address of a storage disk that is corresponding to the ID of the current partition; and generating a key-value packet by using the address of the storage disk as a destination address, and sending the key-value packet to the storage disk, wherein the key-value packet carries the key-value data. - View Dependent Claims (2, 3, 4, 5, 11, 12, 13)
-
-
6. A data processing device, wherein the data processing device comprises:
-
a memory, configured to store a partition view, wherein the partition view records a correspondence between the ID of the current partition and the address of the storage disk; an interface, configured to provide an external connection; a computer-readable medium, configured to store a computer program; and a processor, connected to the memory, the interface, and the computer-readable medium, and configured to execute the following steps by running the program; obtaining a key in key-value data, and calculating, according to the key, the ID of the final partition that is corresponding to the key-value data, wherein the key-value data comprises a value and the key corresponding to the value; calculating the ID of the current partition that is corresponding to the ID of the final partition, wherein an ID of each current partition is corresponding to IDs of a plurality of final partitions; searching the partition view to obtain an address of a storage disk that is corresponding to the ID of the current partition; and generating a key-value packet by using the address of the storage disk as a destination address, and sending the key-value packet to the storage disk through the interface, wherein the key-value packet carries the key-value data. - View Dependent Claims (7, 8, 9, 10, 14, 15, 16)
-
Specification