WO2015055035A1 - Method and device for hashing metadata object - Google Patents
Method and device for hashing metadata object Download PDFInfo
- Publication number
- WO2015055035A1 WO2015055035A1 PCT/CN2014/083044 CN2014083044W WO2015055035A1 WO 2015055035 A1 WO2015055035 A1 WO 2015055035A1 CN 2014083044 W CN2014083044 W CN 2014083044W WO 2015055035 A1 WO2015055035 A1 WO 2015055035A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- metadata object
- metadata
- snapshot
- name
- hash
- Prior art date
Links
- 238000000034 method Methods 0.000 title claims abstract description 21
- 238000004364 calculation method Methods 0.000 claims description 50
- 238000010586 diagram Methods 0.000 description 7
- 230000003993 interaction Effects 0.000 description 7
- 239000000203 mixture Substances 0.000 description 5
- 238000011084 recovery Methods 0.000 description 2
- 238000004590 computer program Methods 0.000 description 1
- 239000006185 dispersion Substances 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 230000029052 metamorphosis Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/10—File systems; File servers
- G06F16/18—File system types
- G06F16/1873—Versioning file systems, temporal file systems, e.g. file system supporting different historic versions of files
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/10—File systems; File servers
- G06F16/11—File system administration, e.g. details of archiving or snapshots
- G06F16/128—Details of file system snapshots on the file-level, e.g. snapshot creation, administration, deletion
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/10—File systems; File servers
- G06F16/13—File access structures, e.g. distributed indices
- G06F16/137—Hash-based
Definitions
- the present invention relates to the field of communications technologies, and in particular, to a method and apparatus for hashing a metadata object.
- a snapshot is one of the important means for system disaster recovery backup.
- the snapshot is mainly used to implement online backup and recovery of data, and can quickly restore data to a specified time point when the system fails, and can allow users to access the snapshot.
- the snapshot version data (hereinafter referred to as snapshot data) of the metadata object generated by the protected metadata object at any point in time.
- snapshot data The snapshot version data (hereinafter referred to as snapshot data) of the metadata object generated by the protected metadata object at any point in time.
- snapshot data The snapshot version data (hereinafter referred to as snapshot data) of the metadata object generated by the protected metadata object at any point in time.
- the current cluster system needs to split the directory metadata object to hash all metadata objects to different nodes. Since the snapshot is directory-based, if the directory node is split, the snapshot metadata object generated when the metadata object is protected by the snapshot is also hashed to a different metadata server node.
- a metadata object (including a normal metadata object and a snapshot metadata object) is hashed by the name of each metadata object (including a common element) in the same directory (for example, a directory whose node is too large).
- the name of the data object and the name of the snapshot metadata object are executed by HASH calculation, and all metadata objects are hashed to different nodes according to the result of the HASH calculation.
- the respective metadata objects are
- each metadata object in Figure 1 (including two general metadata objects Filel and File2 under the current metadata server node Dir and its corresponding snapshot metadata object Filel@snapl,
- the technical problem to be solved by the embodiments of the present invention is to provide a metadata server node that hashes the metadata objects, and reduces the randomness of the metadata objects being hashed to different metadata server nodes, and the snapshot is improved. Data access efficiency, improved snapshot access performance and overall system performance.
- a first aspect of the embodiments of the present invention provides a method for hashing a metadata object, including: determining whether a metadata object is a snapshot metadata object;
- the metadata object is not a snapshot metadata object, calculating a hash value of the metadata object by using the name of the metadata object as an input value;
- the metadata object is a snapshot metadata object, calculating a hash value of the metadata object by using a version name in a name of the metadata object as an input value;
- the metadata object is hashed to a corresponding metadata server node based on a hash value of the metadata object.
- the snapshot metadata object is a snapshot version of a metadata object generated when the metadata object is protected by a snapshot
- the composition of the name of the snapshot metadata object includes: version name + delimiter + version number.
- the determining whether the metadata object is a snapshot metadata object includes:
- the calculating the metadata object by using the name of the metadata object as an input value Hash values including:
- the name of the metadata object is used as an input value of the HASH calculation, and the metadata object is subjected to HASH calculation to determine a hash value of the metadata object.
- the calculating by using the version name in the name of the metadata object as the input value,
- the hash value of the metadata object including:
- the version name in the name of the metadata object is used as an input value of the HASH calculation, and the metadata object is subjected to HASH calculation to determine a hash value of the metadata object.
- the second aspect of the embodiment of the present invention provides an apparatus for hashing a metadata object, including: a determining module, configured to determine whether the metadata object is a snapshot metadata object;
- a first calculating module configured to calculate a hash value of the metadata object by using a name of the metadata object as an input value when the determining result of the determining module is negative;
- a second calculating module configured to calculate a hash value of the metadata object by using a version name in a name of the metadata object as an input value when the determining result of the determining module is YES;
- a hashing module configured to hash the metadata object to a corresponding metadata server node according to a hash value of the metadata object.
- the snapshot metadata object is a snapshot version of a metadata object generated when the metadata object is protected by a snapshot
- the composition of the name of the snapshot metadata object includes: version name + delimiter + version number.
- the determining module is specifically configured to: when determining whether the metadata object is a snapshot metadata object,
- the first calculating module calculates the name of the metadata object as an input value
- the hash value of a metadata object specifically: The name of the metadata object is used as an input value of the HASH calculation, and the metadata object is subjected to HASH calculation to determine a hash value of the metadata object.
- the second calculating module takes the version name in the name of the metadata object as an input When the value is calculated as the hash value of the metadata object, it is specifically used to:
- the version name in the name of the metadata object is used as an input value of the HASH calculation, and the metadata object is subjected to HASH calculation to determine a hash value of the metadata object.
- the embodiment of the present invention may calculate a hash value of the metadata object according to the name of the metadata object and the version name of the snapshot metadata object, and hash the metadata object to the corresponding metadata server node according to the calculated hash value.
- the embodiment of the present invention may hash the current metadata object and its different versions of the snapshot metadata object to the same metadata server node, and reduce the randomness of the metadata object being hashed to different metadata server nodes. Improve the access efficiency of snapshot data, reduce the information interaction between the metadata server nodes due to snapshot access, improve the access performance of the snapshot and the overall performance of the system.
- FIG. 1 is a schematic diagram of relationship between a snapshot protected metadata object and a generated snapshot metadata object in the prior art
- FIG. 2 is a schematic diagram of a snapshot metadata object generated by a snapshot protected metadata object in a prior art being hashed to different nodes;
- FIG. 3 is a schematic flowchart of a method for hashing a metadata object according to an embodiment of the present invention
- FIG. 4 is a metadata protected by a snapshot in an embodiment of a method for hashing a metadata object according to an embodiment of the present invention
- FIG. 5 is a schematic structural diagram of an apparatus for hashing a metadata object according to an embodiment of the present invention
- FIG. 6 is a schematic diagram of a terminal provided by an embodiment of the present invention
- Example structure diagram Example structure diagram.
- FIG. 3 it is a schematic flowchart of an embodiment of a method for hashing a metadata object according to an embodiment of the present invention.
- the method for hashing a metadata object described in this embodiment includes the steps of:
- step S101 Determine whether the metadata object is a snapshot metadata object. If the determination result is no, step S102 is performed. If the determination result is yes, step S102 is performed.
- the snapshot metadata object described in the embodiment of the present invention is a snapshot version of the metadata object generated when the metadata object is protected by the snapshot, and the snapshot version generated by one common metadata object may include multiple.
- the current main ways to implement snapshots include COW (Copy On Write) and ROW (Redirect On Write). If the method for implementing snapshots is COW, the data is protected by snapshots mainly referring to new data.
- the data at the location is first read out and written to another location (the storage space reserved for the snapshot, which can be called the snapshot space, and the data stored in the space is Snapshot data), then write new data to the location;
- the storage space reserved for the snapshot which can be called the snapshot space, and the data stored in the space is Snapshot data
- the data is protected by snapshot mainly refers to the newly written data when the new data is first written to a storage location. Being redirected to a new storage location, the storage location of the original data becomes the snapshot space.
- the protection of the metadata object by the snapshot is also the same as the protection of the above data by the snapshot.
- the metadata object described in this embodiment may include: a file, a directory, and the like, as shown in FIG.
- Data object, Filel @snapl, Filel@snap3 in Figure 1 is the snapshot metadata object generated by the metadata object Filel, File2@snapl, File2@snap3 is the metadata pair.
- a snapshot metadata object generated by File2; Filel and File2 are two metadata objects under the metadata server node Dir, and Filel@snapl and Filel@snap3 are snapshot metadata objects of different versions of the same version generated by Filel.
- File2@snapl and File2@snap3 are snapshot metadata objects of the same version of the same version generated by File2.
- the namespace of the snapshot metadata object is unique to the system, and the naming rules of the names of the respective snapshot metadata objects are also uniquely determined.
- the naming rule for the name of the snapshot metadata object can be: version name
- delimiter + version number that is, the composition of the name of the snapshot metadata object includes: version name + delimiter + version number, where the delimiter can be "@”.
- version name + delimiter + version number where the delimiter can be "@”.
- filel@snapl Filel is the version name of the snapshot metadata object
- @ is the delimiter
- snapl is the version number.
- the user accesses the snapshot metadata object of the file.
- the snapshot metadata object of the file.
- you need to find these snapshot metadata objects on the same metadata server node you do not need cross-node query.
- hashing all snapshot metadata objects of the same file you can use the same name as the metadata object hash. Enter a value, calculate the hash value of each metadata object, and hash each metadata object based on the hash value.
- the metadata object when it is hashed, it may first determine whether the metadata object is a snapshot metadata object, and if it is a snapshot metadata object, calculate the name by using the version name in the name of the metadata object as an input value.
- the hash value of the metadata object if it is not the snapshot metadata object, can determine that the metadata object is an ordinary metadata object, and then the name of the metadata object can be used as an input value to calculate the dispersion of the metadata object. Column value.
- determining whether the metadata object is a snapshot metadata object may determine, according to the name of the metadata object, whether the name of the metadata object includes a name identifier of the snapshot metadata object, where the name identifier of the snapshot metadata object Specifically, it may be a delimiter in the name of the snapshot metadata object (for example, @ ). If it is determined that the name of the metadata object includes a delimiter in the name of the snapshot metadata object, the metadata object may be determined to be known. For the snapshot metadata object, if the name of the metadata object does not include the delimiter in the name of the object of the snapshot metadata, it can be determined that the metadata object is not the snapshot metadata object, but the current metadata object. .
- the hash value of the metadata object is calculated by using the name of the current metadata object as an input value
- the name of the metadata object is used as an input value calculated by HASH
- the metadata object is subjected to HASH calculation.
- the version name in the name of the metadata object is used as an input value of the HASH calculation, and the metadata object is subjected to HASH calculation to determine the hash value of the metadata object.
- the calculated hash values of Filel, Filel@snapl, and Filel@snap3 are the same value.
- the metadata objects File2, File2@snapl, and File2@snap3 in Figure 1 since the hash values of File2, File2@snapl, and File2@snap3 are calculated as File2 as the input value of HASH, the calculated File2 is calculated.
- the hash values of File2@snapl and File2@snap3 are also the same value.
- each metadata object may be hashed to the corresponding metadata service node according to the hash value of the metadata object.
- the hash value of the same or similar hash value may be hashed to the same metadata server node by processing the hash value of each metadata object (for example, rounding), or the hash value may be different in size.
- Large metadata objects are hashed to different metadata server nodes, and so on. For example, when hashing each metadata object in Figure 1, since the hash values of the metadata objects Filel, Filel@snapl, and Filel@snap3 are the same value, the hash values of these metadata objects are used.
- the embodiment of the present invention mainly calculates the hash value of the metadata object by using the name of the metadata object and the version name of the snapshot metadata object as the input value of the HASH calculation, and hashing the metadata object according to the calculated hash value to The corresponding metadata server node.
- the hash value of the metadata object and its different versions of the snapshot metadata object is calculated in the embodiment of the present invention, the same hash value can be obtained, and the current metadata object and its different versions of the snapshot element can be obtained.
- the data objects are hashed to the same metadata server node, which reduces the randomness of the metadata objects being hashed to different metadata server nodes, thereby improving the access efficiency of the snapshot data and reducing the snapshot access between the metadata server nodes. Increased information interaction, improved snapshot access performance and overall system performance.
- FIG. 5 is a schematic structural diagram of an embodiment of an apparatus for hashing a metadata object according to an embodiment of the present invention.
- the device for hashing the metadata object described in this embodiment includes: a determining module 10, configured to determine whether the metadata object is a snapshot metadata object.
- the first calculating module 20 is configured to calculate a hash value of the metadata object by using the name of the metadata object as an input value when the determining result of the determining module is negative.
- the second calculating module 30 is configured to calculate a hash value of the metadata object by using a version name in the name of the metadata object as an input value when the determining result of the determining module is YES.
- the hashing module 40 is configured to hash the metadata object to a corresponding metadata server node according to a hash value of the metadata object.
- the determining module determines whether the metadata object is a snapshot metadata object
- the determining module is specifically configured to:
- the first computing module calculates the hash value of the metadata object by using the name of the metadata object as an input value, specifically:
- the name of the metadata object is used as an input value of the HASH calculation, and the metadata object is subjected to HASH calculation to determine a hash value of the metadata object.
- the second calculating module calculates the hash value of the metadata object by using the version name in the name of the metadata object as an input value, specifically:
- the version name in the name of the metadata object is used as an input value of the HASH calculation, and the metadata object is subjected to HASH calculation to determine a hash value of the metadata object.
- the snapshot metadata object described in the embodiment of the present invention is a snapshot version of the metadata object generated when the metadata object is protected by the snapshot, where the snapshot version generated by one common metadata object may include multiple, Common metadata objects under the metadata server node described in the embodiments may include: files, directories, and the like.
- Filel and File2 are ordinary metadata objects under the metadata server node Dir described in the embodiment of the present invention, and Filel @snapl and Filel@snap3 in FIG. 1 are generated by the metadata object Filel.
- the snapshot metadata object is the snapshot metadata object generated by the metadata object File2;
- Filel and File2 are the two metadata objects under the metadata server node Dir,
- Filel@snapl and Filel@ Snap3 is a snapshot metadata object of the same version of the same version generated by Filel, according to the object.
- the namespace of the snapshot metadata object is unique to the system, and the naming rules of the names of the respective snapshot metadata objects are also uniquely determined.
- the naming rule of the name of the snapshot metadata object may be: a version name + a delimiter + a version number, that is, a composition of a name of the snapshot metadata object includes: a version name + a delimiter + a version number, where The delimiter can be "@".
- a version name + a delimiter + a version number that is, a composition of a name of the snapshot metadata object includes: a version name + a delimiter + a version number, where The delimiter can be "@".
- Filel@snapl Filel is the version name of the snapshot metadata object
- @ is the delimiter
- snapl is the version number.
- the user accesses the snapshot metadata object of the file.
- the snapshot metadata object of the file.
- you need to find these snapshot metadata objects on the same metadata server node you do not need cross-node query.
- hashing all snapshot metadata objects of the same file you can use the same name as the metadata object hash. Enter a value, calculate the hash value of each metadata object, and hash each metadata object based on the hash value.
- the determining module 10 may first determine whether the metadata object is a snapshot metadata object, and if it is a snapshot metadata object, the second computing module 30 is in the name of the metadata object. The version name as the input value, calculate the hash value of the metadata object, if not the snapshot metadata. The object can determine that the metadata object is a normal metadata object, and the first computing module 20 can calculate the hash value of the metadata object by using the name of the metadata object as an input value.
- the determining module 10 determines whether the metadata object is a snapshot metadata object, and determines, according to the name of the metadata object, whether the name of the metadata object includes a name identifier of the snapshot metadata object, where the snapshot metadata object is The name identifier may specifically be a delimiter in the name of the snapshot metadata object (for example, @ ). If it is determined that the name of the metadata object includes a delimiter in the name of the snapshot metadata object, it may be determined that the identifier is The metadata object is a snapshot metadata object. If the name of the metadata object does not include a delimiter in the name of the object of the snapshot metadata, it can be determined that the metadata object is not a snapshot metadata object, but the current Metadata object.
- the name of the current metadata object is used as the input value to calculate the hash value of the metadata object, specifically, the name of the metadata object is calculated as HASH.
- the input value, the HASH calculation is performed on the metadata object, and the hash value of the metadata object is determined;
- the second calculation module 30 calculates the hash value of the snapshot metadata object, the version in the name of the snapshot metadata object may be The name is used as an input value of the HASH calculation, and the metadata object is subjected to HASH calculation to determine the hash value of the metadata object. For example, when hashing each metadata object in FIG.
- the first calculation module 20 when calculating the hash value, can directly calculate Filel or File2 as the input value of HASH.
- the input values calculate the hash values for Filel@snapl and Filel@snap3.
- the calculated hash values of Filel, Filel@snapl, and Filel @snap3 are the same value.
- the metadata objects File2, File2@snapl, and File2@snap3 in Figure 1 since the hash values of File2, File2@snapl, and File2@snap3 are calculated as File2 as the input value of HASH, the calculated File2 is calculated.
- the hash values of File2@snapl and File2@snap3 are also the same value.
- the hash module 40 may perform each element according to the hash value of the metadata object.
- the data object is hashed to the corresponding metadata service node.
- the hash module 40 may treat the hash values of the respective metadata objects by processing (eg, rounding) the hash values to be the same or Nearly metadata objects are hashed to the same metadata server node, or metadata objects with large differences in hash values are hashed to different metadata server nodes.
- Hash can be hashed to the same metadata server node by Filel, Filel@snapl, and Filel@snap3; in addition, the hash values of the metadata objects File2, File2@snapl, and File2@snap3 are the same value. Hash File2, File2@snapl, and File2@snap3 to the same metadata server node, as shown in Figure 4.
- the metadata objects of all snapshot versions of the same file in Figure 2 may be hashed to different metadata server nodes, for example, the metadata version of Filel's snapshot version Filel@snapl and Filel@snap3 may be hashed to the node Dirl and the node Dir2 respectively.
- the user accesses the snapshot data it may need to query across the nodes to obtain the complete snapshot data.
- all the snapshot versions of the same file are in the meta-version.
- Data objects are hashed to the same metadata server node.
- the metadata objects Filel@snapl and Filel@snap3 of the snapshot version of Filel are hashed to the node Dirl.
- the device for hashing the metadata object described in the embodiment of the present invention mainly calculates the hash value of the metadata object by using the name of the metadata object and the version name of the snapshot metadata object as the input value of the HASH calculation, and according to The computed hash value hashes the metadata object to the corresponding metadata server node.
- the device described in the embodiment of the present invention can obtain the same hash value when calculating the hash value of the metadata object and its different versions of the snapshot metadata object, and thus the current metadata object and its different versions can be obtained.
- the snapshot metadata object is hashed to the same metadata server node, which reduces the randomness of the metadata object being hashed to different metadata server nodes, thereby improving the access efficiency of the snapshot data and reducing the snapshot between the metadata server nodes. Increased information interaction for access, improving snapshot access performance and overall system performance.
- FIG. 6 is a schematic structural diagram of an embodiment of a terminal according to an embodiment of the present invention.
- the terminal described in this embodiment includes:
- the memory 100 is configured to store instructions.
- the processor 200 is configured to read an instruction from the memory, and perform an operation according to the instruction: determining whether the metadata object is a snapshot metadata object, and if the metadata object is not a snapshot metadata object, Calculating a hash value of the metadata object as an input value, and if the metadata object is a snapshot metadata object, calculating a version name in a name of the metadata object as an input value Deriving a hash value of the metadata object, hashing the metadata object to a corresponding metadata server node according to a hash value of the metadata object.
- the processor 200 when determining, by the processor 200, whether the metadata object is a snapshot metadata object, the processor 200 is specifically configured to:
- the determination result is yes, it is determined that the metadata object is a snapshot metadata object, and if the determination result is no, it is determined that the metadata object is not a snapshot metadata object.
- the processor 200 when the processor 200 calculates the hash value of the metadata object as the input value, the processor 200 is specifically configured to:
- the name of the metadata object is used as an input value of the HASH calculation, and the metadata object is subjected to HASH calculation to determine a hash value of the metadata object.
- the processor 200 calculates a hash value of the metadata object by using a version name in a name of the metadata object as an input value, specifically, the method is:
- the version name in the name of the metadata object is used as an input value of the HASH calculation, and the metadata object is subjected to HASH calculation to determine a hash value of the metadata object.
- the snapshot metadata object described in the embodiment of the present invention is a snapshot version of the metadata object generated when the metadata object is protected by the snapshot, where the snapshot version generated by one common metadata object may include multiple, Common metadata objects under the metadata server node described in the embodiments may include: files, directories, and the like.
- Filel and File2 are ordinary metadata objects under the metadata server node Dir described in the embodiment of the present invention, and Filel @snapl and Filel@snap3 in FIG. 1 are generated by the metadata object Filel.
- the snapshot metadata object is the snapshot metadata object generated by the metadata object File2;
- Filel and File2 are the two metadata objects under the metadata server node Dir,
- Filel@snapl and Filel@ Snap3 is a snapshot metadata object of the same version with different version numbers generated by Filel. According to the object.
- the namespace of the snapshot metadata object is unique to the system, and the naming rules of the names of the respective snapshot metadata objects are also uniquely determined.
- the naming rule of the name of the snapshot metadata object may be: a version name + a delimiter + a version number, that is, a composition of a name of the snapshot metadata object includes: a version name + a delimiter + a version number, where The delimiter can be "@".
- a version name + a delimiter + a version number that is, a composition of a name of the snapshot metadata object includes: a version name + a delimiter + a version number, where The delimiter can be "@".
- Filel@snapl Filel is the version name of the snapshot metadata object
- @ is the delimiter
- snapl is the version number.
- the user accesses the snapshot metadata object of the file. Only need to find these snapshot metadata objects in the same metadata server node, without cross-node query, the processor 200 can hash all the snapshot metadata objects of the same file with the same name as the metadata object. The input value of the column calculation, the hash value of each metadata object is calculated, and each metadata object is hashed according to the hash value.
- the processor 200 when the processor 200 hashes the metadata object, it may first determine whether the metadata object is a snapshot metadata object, and if it is a snapshot metadata object, use the version name in the name of the metadata object as an input value. Calculating a hash value of the metadata object. If it is not a snapshot metadata object, determining that the metadata object is an ordinary metadata object, and then calculating the metadata by using the name of the metadata object as an input value. The hash value of the object.
- the processor 200 determines whether the metadata object is a snapshot metadata object, and determines, according to the name of the metadata object, whether the name of the metadata object includes a name identifier of the snapshot metadata object, where the snapshot metadata object is The name identifier may specifically be a delimiter in the name of the snapshot metadata object (for example, @ ). If it is determined that the name of the metadata object includes a delimiter in the name of the snapshot metadata object, it may be determined that the identifier is The metadata object is a snapshot metadata object. If the name of the metadata object does not include a delimiter in the name of the object of the snapshot metadata, it may be determined that the metadata object is not a snapshot metadata object, but the current Metadata object.
- the processor 200 calculates the hash value of the metadata object by using the name of the current metadata object as an input value, specifically, the name of the metadata object is used as an input value calculated by HASH, and the metadata object is performed on the metadata object.
- HASH calculation determining a hash value of the metadata object; when the processor 200 calculates a hash value of the snapshot metadata object, the version name in the name of the snapshot metadata object may be used as an input value of the HASH calculation, and the metadata is The object performs HASH calculation, determining The hash value of this metadata object. For example, when hashing each metadata object in FIG.
- the processor 200 Since the processor 200 calculates the hash values of Filel, Filel@snapl, and Filel@snap3 with Filel as the input value of HASH, the calculated hash values of Filel, Filel@snapl, and Filel@snap3 are the same value. . Similarly, for the metadata objects File2, File2@snapl, and File2@snap3 in FIG. 1, since the processor 200 calculates the hash values of File2, File2@snapl, and File2@snap3 using File2 as the input value of HASH, the calculation is performed. The obtained hash values of File2, File2@snapl, and File2@snap3 are also the same value.
- each of the metadata objects may be hashed according to the hash value of the metadata object to the corresponding metadata service node.
- the processor 200 may hash the metadata objects with the same or similar hash values to the same metadata server node by processing (eg, rounding) the hash values of the respective metadata objects, or hashing Metadata objects with large differences in value are hashed to different metadata server nodes, and so on. For example, when hashing each metadata object in Figure 1, since the hash values of the metadata objects Filel, Filel@snapl, and Filel @snap3 are the same value, the hash values of these metadata objects are used.
- the user may need to query across the nodes to obtain the complete snapshot data.
- all the snapshot versions of the same file are in the meta-version.
- Data objects are hashed to the same metadata server node.
- the metadata objects Filel @snapl and Filel@snap3 of the snapshot version of Filel are hashed to the node Dirl.
- the complete snapshot data can be obtained without cross-nodes, which reduces the information interaction between the metadata server nodes due to snapshot access, and reduces the overhead of snapshot access.
- the terminal described in the embodiment of the present invention may calculate the hash value of the metadata object by using the name of the metadata object and the version name of the snapshot metadata object as the input value of the HASH calculation, and the metadata object according to the calculated hash value. Hash to the corresponding metadata server node.
- the version of the snapshot metadata object is hashed to the same metadata server node, reducing the randomness of the metadata object being hashed to different metadata server nodes, thereby improving the access efficiency of the snapshot data and reducing the metadata server node Increased information interaction due to snapshot access, improving snapshot access performance and overall system performance.
- the storage medium may be a magnetic disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM).
Abstract
Disclosed is a method for hashing a metadata object, comprising: determining whether or not a metadata object is a snapshot metadata object; if the metadata object is not a snapshot metadata object, then using a name of the metadata object as an input value in calculating a hash value of the metadata object; if the metadata object is a snapshot metadata object, then using a version name in the name of the metadata object as an input value in calculating a hash value of the metadata object; and, hashing the metadata object to a corresponding metadata server node on the basis of the hash value of the metadata object. Also disclosed is a device for hashing a metadata object. Provided are the advantages of reduced randomness of the metadata object being hashed to different metadata server nodes, increased access efficiency of snapshot data, and increased snapshot access performance and overall system performance.
Description
一种对元数据对象进行散列的方法及装置 本申请要求于 2013年 10月 18日提交中国专利局、申请号 201310493842.0、 发明名称为 "一种对元数据对象进行散列的方法及装置" 的中国专利申请的优 先权, 其全部内容通过引用结合在本申请中。 Method and device for hashing metadata objects The present application claims to be filed on October 18, 2013 with the Chinese Patent Office, application number 201310493842.0, and the invention name is "a method and device for hashing metadata objects" Priority of the Chinese Patent Application, the entire contents of which is incorporated herein by reference.
技术领域 本发明涉及通信技术领域, 尤其涉及一种对元数据对象进行散列的方法及 装置。 TECHNICAL FIELD The present invention relates to the field of communications technologies, and in particular, to a method and apparatus for hashing a metadata object.
背景技术 快照是系统容灾备份的重要手段之一, 快照主要用于实现数据的在线备份 和恢复, 可以在系统出现故障时快速地将数据恢复到指定时间点状态, 并且可 以允许用户访问被快照保护的元数据对象在任意时间点生成的元数据对象的 快照版本数据(下称快照数据)。 当前集群系统为了保证系统中各个元数据服 务器的负载均衡, 防止某一个目录节点过大或者访问热度过大, 需要将目录元 数据对象进行分裂将所有元数据对象散列到不同的节点。 由于快照是基于目录 的, 故此, 如果目录节点被分裂, 元数据对象被快照保护时生成的快照元数据 对象也会被散列到不同的元数据服务器节点上。 现有技术中, 元数据对象 (包括普通的元数据对象和快照元数据对象)散 列时主要是以同一个目录(例如节点过大的目录)下的各个元数据对象的名称 (包括普通元数据对象的名称和快照元数据对象的名称)执行 HASH计算,根 据 HASH计算的结果将所有元数据对象散列到不同的节点上。现有技术中由于 同一个目录下的各个元数据对象的名称各不相同, 故此各个元数据对象的 BACKGROUND A snapshot is one of the important means for system disaster recovery backup. The snapshot is mainly used to implement online backup and recovery of data, and can quickly restore data to a specified time point when the system fails, and can allow users to access the snapshot. The snapshot version data (hereinafter referred to as snapshot data) of the metadata object generated by the protected metadata object at any point in time. In order to ensure the load balancing of each metadata server in the system and prevent a directory node from being too large or too hot, the current cluster system needs to split the directory metadata object to hash all metadata objects to different nodes. Since the snapshot is directory-based, if the directory node is split, the snapshot metadata object generated when the metadata object is protected by the snapshot is also hashed to a different metadata server node. In the prior art, a metadata object (including a normal metadata object and a snapshot metadata object) is hashed by the name of each metadata object (including a common element) in the same directory (for example, a directory whose node is too large). The name of the data object and the name of the snapshot metadata object are executed by HASH calculation, and all metadata objects are hashed to different nodes according to the result of the HASH calculation. In the prior art, since the names of the respective metadata objects in the same directory are different, the respective metadata objects are
HASH计算结果也多种多样, 各个元数据对象散列到不同节点的随机性强。 如 图 1 , 以图 1中各个元数据对象(包括当前元数据服务器节点 Dir下的两个普 通元数据对象 Filel和 File2及其对应的快照元数据对象 Filel@snapl、 HASH calculation results are also diverse, and each metadata object is hashed to different nodes with strong randomness. As shown in Figure 1, each metadata object in Figure 1 (including two general metadata objects Filel and File2 under the current metadata server node Dir and its corresponding snapshot metadata object Filel@snapl,
Filel@snap3 , File2@snapl、 File2@snap3等, 其中 "Dir" 中文可定义为 "目 录", "File" 中文可定义为 "文件", "snap" 为 "snapshot (快照)" 的缩写,
其中文可定义为 "快照 ", 下文图 2、 图 4中的 "File" 和 "snap" 也可为相同 的中文意思,后续不再赘述)的名称进行 HASH计算后可将各个元数据对象散 列到不同节点, 如图 2, 图 2中 Dirl和 Dir2为两个不同的节点, 由于图 1中 各个元数据对象的名称各不相同,各元数据对象的 HASH结果也不尽相同,使 得图 1中的所有元数据对象被散列到 Dirl或者 Dir2节点上的随机性强。 现有 技术中同一个元数据对象的不同快照版本被散列到不同的节点的可能性高, 快 照数据的访问开销大、 访问性能低, 系统性能低。 Filel@snap3, File2@snapl, File2@snap3, etc., where "Dir" Chinese can be defined as "directory", "File" Chinese can be defined as "file", and "snap" is an abbreviation of "snapshot". The Chinese can be defined as "snapshot". The "File" and "snap" in Figure 2 and Figure 4 below can also be in the same Chinese meaning. The names of the subsequent HASH calculations can be used to separate the metadata objects. Columns to different nodes, as shown in Figure 2, Dirl and Dir2 in Figure 2 are two different nodes. Since the names of the various metadata objects in Figure 1 are different, the HASH results of each metadata object are not the same, so that the graph All metadata objects in 1 are hashed to the Dirl or Dir2 nodes with strong randomness. In the prior art, different snapshot versions of the same metadata object are hashed to different nodes, the access cost of the snapshot data is large, the access performance is low, and the system performance is low.
发明内容 本发明实施例所要解决的技术问题在于,提供一种对元数据对象进行散列 同的元数据服务器节点上, 降低元数据对象被散列到不同元数据服务器节点的 随机性, 提高快照数据的访问效率, 提高快照的访问性能和系统的整体性能。 SUMMARY OF THE INVENTION The technical problem to be solved by the embodiments of the present invention is to provide a metadata server node that hashes the metadata objects, and reduces the randomness of the metadata objects being hashed to different metadata server nodes, and the snapshot is improved. Data access efficiency, improved snapshot access performance and overall system performance.
本发明实施例第一方面提供了一种对元数据对象进行散列的方法, 包括: 判断元数据对象是否为快照元数据对象; A first aspect of the embodiments of the present invention provides a method for hashing a metadata object, including: determining whether a metadata object is a snapshot metadata object;
若所述元数据对象不是快照元数据对象, 则将所述元数据对象的名称作为 输入值计算所述元数据对象的散列值; If the metadata object is not a snapshot metadata object, calculating a hash value of the metadata object by using the name of the metadata object as an input value;
若所述元数据对象为快照元数据对象, 则将所述元数据对象的名称中的版 本名称作为输入值计算所述元数据对象的散列值; If the metadata object is a snapshot metadata object, calculating a hash value of the metadata object by using a version name in a name of the metadata object as an input value;
根据所述元数据对象的散列值将所述元数据对象散列到相应的元数据服 务器节点。 The metadata object is hashed to a corresponding metadata server node based on a hash value of the metadata object.
结合第一方面, 在第一种可能的实施方式中, 所述快照元数据对象为元数 据对象被快照保护时生成的元数据对象的快照版本; With reference to the first aspect, in a first possible implementation, the snapshot metadata object is a snapshot version of a metadata object generated when the metadata object is protected by a snapshot;
所述快照元数据对象的名称的组成包括: 版本名称 +分界符 +版本号。 结合第一方面第一种可能的实现方式, 在第二种可能的实现方式中, 所述 判断元数据对象是否为快照元数据对象, 包括: The composition of the name of the snapshot metadata object includes: version name + delimiter + version number. With reference to the first possible implementation manner of the first aspect, in a second possible implementation, the determining whether the metadata object is a snapshot metadata object includes:
判断所述元数据对象的名称中是否包含快照元数据对象的名称标识符; 若判断结果为是, 则判定所述元数据对象为快照元数据对象, 若判断结果 为否, 则判定所述元数据对象不是快照元数据对象。
结合第一方面至第一方面第二种可能的实现方式中任一种, 在第三种可能 的实现方式中, 所述将所述元数据对象的名称作为输入值计算所述元数据对象 的散列值, 包括: Determining whether the name of the metadata object includes a name identifier of the snapshot metadata object; if the determination result is yes, determining that the metadata object is a snapshot metadata object, and if the determination result is no, determining the element The data object is not a snapshot metadata object. With reference to the first aspect to any one of the second possible implementation manners of the first aspect, in a third possible implementation, the calculating the metadata object by using the name of the metadata object as an input value Hash values, including:
将所述元数据对象的名称作为 HASH计算的输入值,对所述元数据对象进 行 HASH计算, 确定所述元数据对象的散列值。 The name of the metadata object is used as an input value of the HASH calculation, and the metadata object is subjected to HASH calculation to determine a hash value of the metadata object.
结合第一方面至第二方面第二种可能的实现方式中任一种, 在第四种可能 的实现方式中, 所述将所述元数据对象的名称中的版本名称作为输入值计算所 述元数据对象的散列值, 包括: With reference to any one of the first aspect to the second possible implementation manner of the second aspect, in a fourth possible implementation, the calculating, by using the version name in the name of the metadata object as the input value, The hash value of the metadata object, including:
将所述元数据对象的名称中的版本名称作为 HASH计算的输入值,对所述 元数据对象进行 HASH计算, 确定所述元数据对象的散列值。 The version name in the name of the metadata object is used as an input value of the HASH calculation, and the metadata object is subjected to HASH calculation to determine a hash value of the metadata object.
本发明实施例第二方面提供了一种对元数据对象进行散列的装置, 包括: 判断模块, 用于判断元数据对象是否为快照元数据对象; The second aspect of the embodiment of the present invention provides an apparatus for hashing a metadata object, including: a determining module, configured to determine whether the metadata object is a snapshot metadata object;
第一计算模块, 用于在判断模块判断结果为否时, 将所述元数据对象的名 称作为输入值计算所述元数据对象的散列值; a first calculating module, configured to calculate a hash value of the metadata object by using a name of the metadata object as an input value when the determining result of the determining module is negative;
第二计算模块, 用于在判断模块判断结果为是时, 将所述元数据对象的名 称中的版本名称作为输入值计算所述元数据对象的散列值; a second calculating module, configured to calculate a hash value of the metadata object by using a version name in a name of the metadata object as an input value when the determining result of the determining module is YES;
散列模块, 用于根据所述元数据对象的散列值将所述元数据对象散列到相 应的元数据服务器节点。 And a hashing module, configured to hash the metadata object to a corresponding metadata server node according to a hash value of the metadata object.
结合第二方面, 在第一种可能的实现方式中, 所述快照元数据对象为元数 据对象被快照保护时生成的元数据对象的快照版本; With reference to the second aspect, in a first possible implementation, the snapshot metadata object is a snapshot version of a metadata object generated when the metadata object is protected by a snapshot;
所述快照元数据对象的名称的组成包括: 版本名称 +分界符 +版本号。 结合第二方面第一种可能的实现方式, 在第二种可能的实现方式中, 所述 判断模块在判断元数据对象是否为快照元数据对象时, 具体用于: The composition of the name of the snapshot metadata object includes: version name + delimiter + version number. With reference to the first possible implementation manner of the second aspect, in a second possible implementation, the determining module is specifically configured to: when determining whether the metadata object is a snapshot metadata object,
判断所述元数据对象的名称中是否包含快照元数据对象的名称标识符, 若 判断结果为是, 则判定所述元数据对象为快照元数据对象, 若判断结果为否, 则判定所述元数据对象不是快照元数据对象。 Determining whether the name of the metadata object includes a name identifier of the snapshot metadata object, and if the determination result is yes, determining that the metadata object is a snapshot metadata object, and if the determination result is no, determining the element The data object is not a snapshot metadata object.
结合第二方面至第二方面第二种可能的实现方式中任一种, 在第三种可能 的实现方式中 , 所述第一计算模块将所述元数据对象的名称作为输入值计算所 述元数据对象的散列值时, 具体用于:
将所述元数据对象的名称作为 HASH计算的输入值,对所述元数据对象进 行 HASH计算, 确定所述元数据对象的散列值。 With reference to any one of the second aspect to the second possible implementation of the second aspect, in a third possible implementation, the first calculating module calculates the name of the metadata object as an input value When the hash value of a metadata object is used, specifically: The name of the metadata object is used as an input value of the HASH calculation, and the metadata object is subjected to HASH calculation to determine a hash value of the metadata object.
结合第二方面至第二方面第二种可能的实现方式中任一种, 在第四种可能 的实现方式中, 所述第二计算模块将所述元数据对象的名称中的版本名称作为 输入值计算所述元数据对象的散列值时, 具体用于: With reference to any one of the second aspect to the second possible implementation manner of the second aspect, in a fourth possible implementation, the second calculating module takes the version name in the name of the metadata object as an input When the value is calculated as the hash value of the metadata object, it is specifically used to:
将所述元数据对象的名称中的版本名称作为 HASH计算的输入值,对所述 元数据对象进行 HASH计算, 确定所述元数据对象的散列值。 本发明实施例可根据元数据对象的名称以及快照元数据对象的版本名称 计算元数据对象的散列值, 并根据计算得到的散列值将元数据对象散列至相应 的元数据服务器节点。 本发明实施例可将当前元数据对象和它的各个不同版本 的快照元数据对象散列到同一个元数据服务器节点上, 降低元数据对象被散列 到不同元数据服务器节点的随机性, 可提高快照数据的访问效率, 减少了元数 据服务器节点间因快照访问而增加的信息交互,提高快照的访问性能和系统的 整体性能。 The version name in the name of the metadata object is used as an input value of the HASH calculation, and the metadata object is subjected to HASH calculation to determine a hash value of the metadata object. The embodiment of the present invention may calculate a hash value of the metadata object according to the name of the metadata object and the version name of the snapshot metadata object, and hash the metadata object to the corresponding metadata server node according to the calculated hash value. The embodiment of the present invention may hash the current metadata object and its different versions of the snapshot metadata object to the same metadata server node, and reduce the randomness of the metadata object being hashed to different metadata server nodes. Improve the access efficiency of snapshot data, reduce the information interaction between the metadata server nodes due to snapshot access, improve the access performance of the snapshot and the overall performance of the system.
附图说明 为了更清楚地说明本发明实施例或现有技术中的技术方案, 下面将对实施 例或现有技术描述中所需要使用的附图作简单地介绍, 显而易见地, 下面描述 中的附图仅仅是本发明的一些实施例, 对于本领域普通技术人员来讲, 在不付 出创造性劳动的前提下, 还可以根据这些附图获得其他的附图。 BRIEF DESCRIPTION OF THE DRAWINGS In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings to be used in the embodiments or the description of the prior art will be briefly described below, and obviously, in the following description The drawings are only some of the embodiments of the present invention, and those skilled in the art can obtain other drawings based on these drawings without any creative work.
图 1是现有技术中被快照保护的元数据对象及其生成的快照元数据对象的 关系示意图; 1 is a schematic diagram of relationship between a snapshot protected metadata object and a generated snapshot metadata object in the prior art;
图 2是现有技术中被快照保护的元数据对象生成的快照元数据对象被散列 到不同节点的示意图; 2 is a schematic diagram of a snapshot metadata object generated by a snapshot protected metadata object in a prior art being hashed to different nodes;
图 3是本发明实施例提供的对元数据对象进行散列的方法的流程示意图; 图 4是本发明实施例提供的对元数据对象进行散列的方法的实施例中被快 照保护的元数据对象生成的快照元数据对象被散列到不同节点的示意图; 图 5是本发明实施例提供的对元数据对象进行散列的装置的结构示意图; 图 6是本发明实施例提供的终端的实施例结构示意图。
具体实施方式 下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清 楚、 完整地描述, 显然, 所描述的实施例仅仅是本发明一部分实施例, 而不是 全部的实施例。 基于本发明中的实施例, 本领域普通技术人员在没有做出创造 性劳动前提下所获得的所有其他实施例, 都属于本发明保护的范围。 3 is a schematic flowchart of a method for hashing a metadata object according to an embodiment of the present invention; FIG. 4 is a metadata protected by a snapshot in an embodiment of a method for hashing a metadata object according to an embodiment of the present invention; FIG. 5 is a schematic structural diagram of an apparatus for hashing a metadata object according to an embodiment of the present invention; FIG. 6 is a schematic diagram of a terminal provided by an embodiment of the present invention; Example structure diagram. The technical solutions in the embodiments of the present invention are clearly and completely described in the following with reference to the accompanying drawings in the embodiments of the present invention. It is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. example. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments of the present invention without departing from the inventive scope are the scope of the present invention.
参见图 3 , 是本发明实施例提供的对元数据对象进行散列的方法的实施例 流程示意图。 本实施例中所描述的对元数据对象进行散列的方法, 包括步骤: Referring to FIG. 3, it is a schematic flowchart of an embodiment of a method for hashing a metadata object according to an embodiment of the present invention. The method for hashing a metadata object described in this embodiment includes the steps of:
S101 , 判断元数据对象是否为快照元数据对象, 若判断结果为否, 则执行 步骤 S102, 若判断结果为是, 则执行步骤 S102。 S101. Determine whether the metadata object is a snapshot metadata object. If the determination result is no, step S102 is performed. If the determination result is yes, step S102 is performed.
S102 , 将所述元数据对象的名称作为输入值计算所述元数据对象的散列 值。 S102. Calculate a hash value of the metadata object by using the name of the metadata object as an input value.
5103 ,将所述元数据对象的名称中的版本名称作为输入值计算所述元数据 对象的散列值。 5103. Calculate a hash value of the metadata object by using a version name in a name of the metadata object as an input value.
5104,根据所述元数据对象的散列值将所述元数据对象散列到相应的元数 据服务器节点。 5104. Hash the metadata object to a corresponding metadata server node according to a hash value of the metadata object.
具体实现中, 本发明实施例中所描述的快照元数据对象为元数据对象被快 照保护时生成的元数据对象的快照版本, 其中, 一个普通元数据对象生成的快 照版本可包括多个。 当前实现快照的主要方式包括 COW ( Copy On Write, 写 时复制)和 ROW ( Redirect On Write, 写时重定向), 其中, 如果实现快照的 方法是 COW,则数据被快照保护主要是指新数据第一次写入某个存储位置时, 首先将该位置上的数据读取出来,写到另外一个位置(为快照保留的存储空间, 可称之为快照空间, 该空间中存储的数据则为快照数据 ), 之后再将新数据写 入到该位置上; 如果实现快照的方法是 ROW, 则数据被快照保护主要是指新 数据第一次写入某个存储位置时, 新写入的数据被重新定向到新的存储位置, 原数据的存储位置变成快照空间。元数据对象被快照保护也与上述数据被快照 保护同理。 具体实现中, 本实施例中所描述元数据对象可包括: 文件、 目录等, 如图 1 , 其中的 Filel和 File2即为本发明实施例中所描述的元数据服务器节点 Dir下的普通的元数据对象, 图 1中的 Filel @snapl、 Filel@snap3即为元数据 对象 Filel生成的快照元数据对象, File2@snapl、 File2@snap3 即为元数据对
象 File2生成的快照元数据对象; 其中 Filel和 File2为元数据服务器节点 Dir 下的两个元数据对象, Filel@snapl和 Filel@snap3为 Filel生成的相同版本的 不同版本号的快照元数据对象, File2@snapl和 File2@snap3为 File2生成的相 同版本的不同版本号的快照元数据对象。 具体实现中, 快照元数据对象的名称 空间是系统唯一的, 各个快照元数据对象的名称的命名规则也是唯一确定的。 在一些可行的实施方式中, 快照元数据对象的名称的命名规则可为: 版本名称In a specific implementation, the snapshot metadata object described in the embodiment of the present invention is a snapshot version of the metadata object generated when the metadata object is protected by the snapshot, and the snapshot version generated by one common metadata object may include multiple. The current main ways to implement snapshots include COW (Copy On Write) and ROW (Redirect On Write). If the method for implementing snapshots is COW, the data is protected by snapshots mainly referring to new data. When writing to a storage location for the first time, the data at the location is first read out and written to another location (the storage space reserved for the snapshot, which can be called the snapshot space, and the data stored in the space is Snapshot data), then write new data to the location; If the method of implementing the snapshot is ROW, the data is protected by snapshot mainly refers to the newly written data when the new data is first written to a storage location. Being redirected to a new storage location, the storage location of the original data becomes the snapshot space. The protection of the metadata object by the snapshot is also the same as the protection of the above data by the snapshot. In a specific implementation, the metadata object described in this embodiment may include: a file, a directory, and the like, as shown in FIG. 1 , where File1 and File2 are ordinary elements under the metadata server node Dir described in the embodiment of the present invention. Data object, Filel @snapl, Filel@snap3 in Figure 1 is the snapshot metadata object generated by the metadata object Filel, File2@snapl, File2@snap3 is the metadata pair. A snapshot metadata object generated by File2; Filel and File2 are two metadata objects under the metadata server node Dir, and Filel@snapl and Filel@snap3 are snapshot metadata objects of different versions of the same version generated by Filel. File2@snapl and File2@snap3 are snapshot metadata objects of the same version of the same version generated by File2. In a specific implementation, the namespace of the snapshot metadata object is unique to the system, and the naming rules of the names of the respective snapshot metadata objects are also uniquely determined. In some possible implementations, the naming rule for the name of the snapshot metadata object can be: version name
+分界符 +版本号, 即快照元数据对象的名称的组成包括: 版本名称 +分界符 + 版本号, 其中, 分界符可为 "@"。 例如, 在快照元数据对象 Filel@snapl中, Filel为该快照元数据对象的版本名称, @为分界符, snapl为版本号。 + delimiter + version number, that is, the composition of the name of the snapshot metadata object includes: version name + delimiter + version number, where the delimiter can be "@". For example, in the snapshot metadata object Filel@snapl, Filel is the version name of the snapshot metadata object, @ is the delimiter, and snapl is the version number.
在一些可行的实施方式中, 为了使得任一元数据服务器节点下的同一个文 件(或者目录)的所有快照版本被散列到同一个元数据服务器节点, 使得用户 在访问该文件的快照元数据对象时, 只需要在同一个元数据服务器节点查找这 些快照元数据对象, 无需跨节点查询, 对同一个文件的所有快照元数据对象进 行散列时可以以相同的名称作为元数据对象散列计算的输入值,计算各个元数 据对象的散列值, 再根据散列值对各个元数据对象进行散列。 具体实现中, 对 元数据对象进行散列时可先判断元数据对象是否为快照元数据对象, 如果是快 照元数据对象, 则以该元数据对象的名称中的版本名称作为输入值, 计算该元 数据对象的散列值, 如果不是快照元数据对象, 则可判断得知该元数据对象为 普通的元数据对象, 进而可将该元数据对象的名称作为输入值计算该元数据对 象的散列值。 具体的, 判断元数据对象是否为快照元数据对象时可根据元数据 对象的名称判断该元数据对象的名称中是否包含快照元数据对象的名称标识 符, 其中, 快照元数据对象的名称标识符具体可为快照元数据对象的名称中的 分界符 (例如 @ ), 如果判断得知该元数据对象的名称中包含快照元数据对象 的名称中的分界符, 则可判断得知该元数据对象为快照元数据对象, 如果该元 数据对象的名称中不包含快照元数据的对象的名称中的分界符, 则可判断得知 该元数据对象不是快照元数据对象, 而是当前的元数据对象。 具体实现中, 将 当前的元数据对象的名称作为输入值计算该元数据对象的散列值时具体为将 该元数据对象的名称作为 HASH计算的输入值, 对该元数据对象进行 HASH 计算, 确定该元数据对象的散列值; 计算快照元数据对象的散列值时则可将快
照元数据对象的名称中的版本名称作为 HASH计算的输入值,对该元数据对象 进行 HASH计算, 确定该元数据对象的散列值。 例如, 对图 1中的各个元数据 对象进行散列时, 对于当前的元数据对象 Filel或者 File2 , 计算其散列值时可 直接以 Filel或者 File2作为 HASH的输入值计算 Filel或者 File2的散列值; 而对于快照元数据对象 Filel@snapl和 Filel@snap3 , 计算其散列值时则可以 其名称中的版本名称 Filel 作为 HASH 的输入值计算 Filel@snapl 和 Filel@snap3的散列值。 由于计算 Filel、 Filel@snapl以及 Filel@snap3的散列 值时均以 Filel作为 HASH的输入值, 则计算得到的 Filel、 Filel@snapl 以及 Filel@snap3的散列值均为同一个值。 同理, 对于图 1中的元数据对象 File2、 File2@snapl以及 File2@snap3 ,由于计算 File2、 File2@snapl以及 File2@snap3 的散列值均以 File2作为 HASH的输入值, 则计算得到的 File2、 File2@snapl 以及 File2@snap3的散列值也均为同一个值。 In some possible implementations, in order to cause all snapshot versions of the same file (or directory) under any metadata server node to be hashed to the same metadata server node, the user accesses the snapshot metadata object of the file. When you need to find these snapshot metadata objects on the same metadata server node, you do not need cross-node query. When hashing all snapshot metadata objects of the same file, you can use the same name as the metadata object hash. Enter a value, calculate the hash value of each metadata object, and hash each metadata object based on the hash value. In a specific implementation, when the metadata object is hashed, it may first determine whether the metadata object is a snapshot metadata object, and if it is a snapshot metadata object, calculate the name by using the version name in the name of the metadata object as an input value. The hash value of the metadata object, if it is not the snapshot metadata object, can determine that the metadata object is an ordinary metadata object, and then the name of the metadata object can be used as an input value to calculate the dispersion of the metadata object. Column value. Specifically, determining whether the metadata object is a snapshot metadata object may determine, according to the name of the metadata object, whether the name of the metadata object includes a name identifier of the snapshot metadata object, where the name identifier of the snapshot metadata object Specifically, it may be a delimiter in the name of the snapshot metadata object (for example, @ ). If it is determined that the name of the metadata object includes a delimiter in the name of the snapshot metadata object, the metadata object may be determined to be known. For the snapshot metadata object, if the name of the metadata object does not include the delimiter in the name of the object of the snapshot metadata, it can be determined that the metadata object is not the snapshot metadata object, but the current metadata object. . In a specific implementation, when the hash value of the metadata object is calculated by using the name of the current metadata object as an input value, specifically, the name of the metadata object is used as an input value calculated by HASH, and the metadata object is subjected to HASH calculation. Determine the hash value of the metadata object; when calculating the hash value of the snapshot metadata object, it will be faster The version name in the name of the metadata object is used as an input value of the HASH calculation, and the metadata object is subjected to HASH calculation to determine the hash value of the metadata object. For example, when hashing each metadata object in Figure 1, for the current metadata object Filel or File2, when calculating the hash value, you can directly calculate the hash of File1 or File2 by using Filel or File2 as the input value of HASH. For the snapshot metadata objects Filel@snapl and Filel@snap3, when calculating the hash value, the hash value of Filel@snapl and Filel@snap3 can be calculated by using the version name Filel in its name as the input value of HASH. Since the file values are used as HASH input values when calculating the hash values of Filel, Filel@snapl, and Filel@snap3, the calculated hash values of Filel, Filel@snapl, and Filel@snap3 are the same value. Similarly, for the metadata objects File2, File2@snapl, and File2@snap3 in Figure 1, since the hash values of File2, File2@snapl, and File2@snap3 are calculated as File2 as the input value of HASH, the calculated File2 is calculated. The hash values of File2@snapl and File2@snap3 are also the same value.
在一些可行的实施方式中,计算得知各个元数据对象的散列值之后则可根 据元数据对象的散列值将各个元数据对象散列到相应的元数据服务节点上。 具 体的, 可通过对各个元数据对象的散列值进行处理 (例如取整)将散列值相同 或者相近的元数据对象散列到同一个元数据服务器节点上, 或者将散列值大小 相差较大的元数据对象散列到不同的元数据服务器节点上等。 例如, 对图 1中 的各个元数据对象进行散列时, 由于元数据对象 Filel、 Filel@snapl 以及 Filel@snap3 的散列值均为同一个值, 则根据这些元数据对象的散列值进行散 列时可 Filel、 Filel@snapl 以及 Filel @snap3散列到同一个元数据服务器节点 上; 此外, 元数据对象 File2、 File2@snapl 以及 File2@snap3的散列值也为同 一个值, 则可将 File2、 File2@snapl 以及 File2@snap3散列到同一个元数据服 务器节点上, 如图 4。 对比图 2和图 4可知, 在图 2中同一个文件的所有快照 版本的元数据对象可能被散列到不同的元数据服务器节点上,例如, Filel的快 照版本的元数据对象 Filel @snapl和 Filel @snap3可能分别被散列到节点 Dirl 和节点 Dir2 上, 用户对快照数据进行访问时可能需要跨节点进行查询才能获 取到完整的快照数据; 在图 4中同一个文件的所有快照版本的元数据对象都会 被散列到同一个元数据服务器节点上, 例如 Filel 的快照版本的元数据对象 Filel@snapl和 Filel @snap3均被散列到节点 Dirl上, 用户访问某一个文件的
所有快照版本时只需要在该文件的节点查找, 只需要在该节点上进行查询即可 获取完整的快照数据, 无需跨节点, 减少了元数据服务器节点之间因快照访问 带来的信息交互, 降低了快照访问的开销。 In some feasible implementations, after calculating the hash value of each metadata object, each metadata object may be hashed to the corresponding metadata service node according to the hash value of the metadata object. Specifically, the hash value of the same or similar hash value may be hashed to the same metadata server node by processing the hash value of each metadata object (for example, rounding), or the hash value may be different in size. Large metadata objects are hashed to different metadata server nodes, and so on. For example, when hashing each metadata object in Figure 1, since the hash values of the metadata objects Filel, Filel@snapl, and Filel@snap3 are the same value, the hash values of these metadata objects are used. When hashing, Filel, Filel@snapl, and Filel @snap3 are hashed to the same metadata server node; in addition, the hash values of the metadata objects File2, File2@snapl, and File2@snap3 are also the same value. Hash File2, File2@snapl, and File2@snap3 to the same metadata server node, as shown in Figure 4. Comparing Figure 2 with Figure 4, the metadata objects of all snapshot versions of the same file in Figure 2 may be hashed to different metadata server nodes, for example, the metadata version of Filel's snapshot version, Filel @snapl, and Filel @snap3 may be hashed to node Dirl and node Dir2 respectively. Users may need to query across snapshots to obtain complete snapshot data when accessing snapshot data. In Figure 4, all snapshot versions of the same file are in metamorphosis. Data objects are hashed to the same metadata server node. For example, the metadata objects Filel@snapl and Filel @snap3 of the snapshot version of Filel are hashed to the node Dirl, and the user accesses a file. All snapshot versions only need to be searched at the node of the file. Only the query on the node can obtain complete snapshot data without cross-nodes, which reduces the information interaction between the metadata server nodes due to snapshot access. Reduce the overhead of snapshot access.
本发明实施例主要是以元数据对象的名称以及快照元数据对象的版本名 称作为 HASH计算的输入值计算元数据对象的散列值,并根据计算得到的散列 值将元数据对象散列至相应的元数据服务器节点。在本发明实施例中计算元数 据对象和它的各个不同版本的快照元数据对象的散列值时可得到相同的散列 值, 进而可将当前元数据对象和它的各个不同版本的快照元数据对象散列到同 一个元数据服务器节点上, 降低元数据对象被散列到不同元数据服务器节点的 随机性, 进而可提高快照数据的访问效率, 减少了元数据服务器节点间因快照 访问而增加的信息交互, 提高快照的访问性能和系统的整体性能。 The embodiment of the present invention mainly calculates the hash value of the metadata object by using the name of the metadata object and the version name of the snapshot metadata object as the input value of the HASH calculation, and hashing the metadata object according to the calculated hash value to The corresponding metadata server node. When the hash value of the metadata object and its different versions of the snapshot metadata object is calculated in the embodiment of the present invention, the same hash value can be obtained, and the current metadata object and its different versions of the snapshot element can be obtained. The data objects are hashed to the same metadata server node, which reduces the randomness of the metadata objects being hashed to different metadata server nodes, thereby improving the access efficiency of the snapshot data and reducing the snapshot access between the metadata server nodes. Increased information interaction, improved snapshot access performance and overall system performance.
参见图 5, 是本发明实施例提供的对元数据对象进行散列的装置的实施例 结构示意图。 本实施例中所描述的对元数据对象进行散列的装置, 包括: 判断模块 10, 用于判断元数据对象是否为快照元数据对象。 FIG. 5 is a schematic structural diagram of an embodiment of an apparatus for hashing a metadata object according to an embodiment of the present invention. The device for hashing the metadata object described in this embodiment includes: a determining module 10, configured to determine whether the metadata object is a snapshot metadata object.
第一计算模块 20,用于在判断模块判断结果为否时,将所述元数据对象的 名称作为输入值计算所述元数据对象的散列值。 The first calculating module 20 is configured to calculate a hash value of the metadata object by using the name of the metadata object as an input value when the determining result of the determining module is negative.
第二计算模块 30,用于在判断模块判断结果为是时,将所述元数据对象的 名称中的版本名称作为输入值计算所述元数据对象的散列值。 The second calculating module 30 is configured to calculate a hash value of the metadata object by using a version name in the name of the metadata object as an input value when the determining result of the determining module is YES.
散列模块 40,用于根据所述元数据对象的散列值将所述元数据对象散列到 相应的元数据服务器节点。 The hashing module 40 is configured to hash the metadata object to a corresponding metadata server node according to a hash value of the metadata object.
在一些可行的实施方式中, 上述判断模块在判断元数据对象是否为快照元 数据对象时, 具体用于: In some possible implementation manners, when the determining module determines whether the metadata object is a snapshot metadata object, the determining module is specifically configured to:
根据所述元数据对象的名称判断所述元数据对象的名称中是否包含快照 元数据对象的名称标识符, 若判断结果为是, 则判定所述元数据对象为快照元 数据对象, 若判断结果为否, 则判定所述元数据对象不是快照元数据对象。 Determining, according to the name of the metadata object, whether the name of the metadata object includes a name identifier of the snapshot metadata object, and if the determination result is yes, determining that the metadata object is a snapshot metadata object, if the result is determined If not, it is determined that the metadata object is not a snapshot metadata object.
在一些可行的实施方式中, 上述第一计算模块将所述元数据对象的名称作 为输入值计算所述元数据对象的散列值时, 具体用于: In some possible implementations, when the first computing module calculates the hash value of the metadata object by using the name of the metadata object as an input value, specifically:
将所述元数据对象的名称作为 HASH计算的输入值,对所述元数据对象进 行 HASH计算, 确定所述元数据对象的散列值。
在一些可行的实施方式中, 上述第二计算模块将所述元数据对象的名称中 的版本名称作为输入值计算所述元数据对象的散列值时, 具体用于: The name of the metadata object is used as an input value of the HASH calculation, and the metadata object is subjected to HASH calculation to determine a hash value of the metadata object. In some possible implementation manners, when the second calculating module calculates the hash value of the metadata object by using the version name in the name of the metadata object as an input value, specifically:
将所述元数据对象的名称中的版本名称作为 HASH计算的输入值,对所述 元数据对象进行 HASH计算, 确定所述元数据对象的散列值。 The version name in the name of the metadata object is used as an input value of the HASH calculation, and the metadata object is subjected to HASH calculation to determine a hash value of the metadata object.
具体实现中, 本发明实施例中所描述的快照元数据对象为元数据对象被快 照保护时生成的元数据对象的快照版本, 其中, 一个普通元数据对象生成的快 照版本可包括多个, 本实施例中所描述的元数据服务器节点下的普通的元数据 对象可包括: 文件、 目录等。 如图 1 , 其中的 Filel和 File2即为本发明实施例 中所描述的元数据服务器节点 Dir 下的普通的元数据对象, 图 1 中的 Filel @snapl、 Filel@snap3 即为元数据对象 Filel 生成的快照元数据对象, File2@snapl、 File2@snap3即为元数据对象 File2生成的快照元数据对象; 其 中 Filel和 File2为元数据服务器节点 Dir下的两个元数据对象, Filel@snapl 和 Filel@snap3 为 Filel 生成的相同版本的不同版本号的快照元数据对象, 据对象。 具体实现中, 快照元数据对象的名称空间是系统唯一的, 各个快照元 数据对象的名称的命名规则也是唯一确定的。 在一些可行的实施方式中, 快照 元数据对象的名称的命名规则可为: 版本名称 +分界符 +版本号, 即快照元数据 对象的名称的组成包括: 版本名称 +分界符 +版本号, 其中, 分界符可为 "@"。 例如, 在快照元数据对象 Filel@snapl中, Filel为该快照元数据对象的版本名 称, @为分界符, snapl为版本号。 In a specific implementation, the snapshot metadata object described in the embodiment of the present invention is a snapshot version of the metadata object generated when the metadata object is protected by the snapshot, where the snapshot version generated by one common metadata object may include multiple, Common metadata objects under the metadata server node described in the embodiments may include: files, directories, and the like. As shown in FIG. 1, Filel and File2 are ordinary metadata objects under the metadata server node Dir described in the embodiment of the present invention, and Filel @snapl and Filel@snap3 in FIG. 1 are generated by the metadata object Filel. The snapshot metadata object, File2@snapl, File2@snap3, is the snapshot metadata object generated by the metadata object File2; Filel and File2 are the two metadata objects under the metadata server node Dir, Filel@snapl and Filel@ Snap3 is a snapshot metadata object of the same version of the same version generated by Filel, according to the object. In a specific implementation, the namespace of the snapshot metadata object is unique to the system, and the naming rules of the names of the respective snapshot metadata objects are also uniquely determined. In some possible implementation manners, the naming rule of the name of the snapshot metadata object may be: a version name + a delimiter + a version number, that is, a composition of a name of the snapshot metadata object includes: a version name + a delimiter + a version number, where The delimiter can be "@". For example, in the snapshot metadata object Filel@snapl, Filel is the version name of the snapshot metadata object, @ is the delimiter, and snapl is the version number.
在一些可行的实施方式中, 为了使得任一元数据服务器节点下的同一个文 件(或者目录)的所有快照版本被散列到同一个元数据服务器节点, 使得用户 在访问该文件的快照元数据对象时, 只需要在同一个元数据服务器节点查找这 些快照元数据对象, 无需跨节点查询, 对同一个文件的所有快照元数据对象进 行散列时可以以相同的名称作为元数据对象散列计算的输入值,计算各个元数 据对象的散列值, 再根据散列值对各个元数据对象进行散列。 具体实现中, 对 元数据对象进行散列时可先通过判断模块 10判断元数据对象是否为快照元数 据对象, 如果是快照元数据对象, 第二计算模块 30则以该元数据对象的名称 中的版本名称作为输入值, 计算该元数据对象的散列值, 如果不是快照元数据
对象, 则可判断得知该元数据对象为普通的元数据对象, 第一计算模块 20则 可将该元数据对象的名称作为输入值计算该元数据对象的散列值。 具体的, 判 断模块 10判断元数据对象是否为快照元数据对象时可根据元数据对象的名称 判断该元数据对象的名称中是否包含快照元数据对象的名称标识符, 其中, 快 照元数据对象的名称标识符具体可为快照元数据对象的名称中的分界符(例如 @ ), 如果判断得知该元数据对象的名称中包含快照元数据对象的名称中的分 界符, 则可判断得知该元数据对象为快照元数据对象, 如果该元数据对象的名 称中不包含快照元数据的对象的名称中的分界符, 则可判断得知该元数据对象 不是快照元数据对象, 而是当前的元数据对象。 具体实现中, 第一计算模块 20 计算元数据对象的散列值时将当前的元数据对象的名称作为输入值计算该元 数据对象的散列值具体为将该元数据对象的名称作为 HASH计算的输入值,对 该元数据对象进行 HASH计算, 确定该元数据对象的散列值; 第二计算模块 30 计算快照元数据对象的散列值时则可将快照元数据对象的名称中的版本名 称作为 HASH计算的输入值, 对该元数据对象进行 HASH计算, 确定该元数 据对象的散列值。 例如, 对图 1中的各个元数据对象进行散列时, 对于当前的 元数据对象 Filel或者 File2, 计算其散列值时可通过第一计算模块 20直接以 Filel或者 File2作为 HASH的输入值计算 Filel或者 File2的散列值;而对于快 照元数据对象 Filel@snapl和 Filel@snap3 , 计算其散列值时则可通过第二计 算模块 30以快照元数据对象的名称中的版本名称 Filel作为 HASH的输入值计 算 Filel@snapl和 Filel@snap3的散列值。 由于计算 Filel、 Filel@snapl 以及 Filel@snap3的散列值时均以 Filel作为 HASH的输入值,则计算得到的 Filel、 Filel@snapl 以及 Filel @snap3的散列值均为同一个值。 同理, 对于图 1 中的 元数据对象 File2、 File2@snapl以及 File2@snap3 ,由于计算 File2、 File2@snapl 以及 File2@snap3 的散列值均以 File2作为 HASH 的输入值, 则计算得到的 File2、 File2@snapl以及 File2@snap3的散列值也均为同一个值。 In some possible implementations, in order to cause all snapshot versions of the same file (or directory) under any metadata server node to be hashed to the same metadata server node, the user accesses the snapshot metadata object of the file. When you need to find these snapshot metadata objects on the same metadata server node, you do not need cross-node query. When hashing all snapshot metadata objects of the same file, you can use the same name as the metadata object hash. Enter a value, calculate the hash value of each metadata object, and hash each metadata object based on the hash value. In a specific implementation, when the metadata object is hashed, the determining module 10 may first determine whether the metadata object is a snapshot metadata object, and if it is a snapshot metadata object, the second computing module 30 is in the name of the metadata object. The version name as the input value, calculate the hash value of the metadata object, if not the snapshot metadata The object can determine that the metadata object is a normal metadata object, and the first computing module 20 can calculate the hash value of the metadata object by using the name of the metadata object as an input value. Specifically, the determining module 10 determines whether the metadata object is a snapshot metadata object, and determines, according to the name of the metadata object, whether the name of the metadata object includes a name identifier of the snapshot metadata object, where the snapshot metadata object is The name identifier may specifically be a delimiter in the name of the snapshot metadata object (for example, @ ). If it is determined that the name of the metadata object includes a delimiter in the name of the snapshot metadata object, it may be determined that the identifier is The metadata object is a snapshot metadata object. If the name of the metadata object does not include a delimiter in the name of the object of the snapshot metadata, it can be determined that the metadata object is not a snapshot metadata object, but the current Metadata object. In a specific implementation, when the first calculation module 20 calculates the hash value of the metadata object, the name of the current metadata object is used as the input value to calculate the hash value of the metadata object, specifically, the name of the metadata object is calculated as HASH. The input value, the HASH calculation is performed on the metadata object, and the hash value of the metadata object is determined; when the second calculation module 30 calculates the hash value of the snapshot metadata object, the version in the name of the snapshot metadata object may be The name is used as an input value of the HASH calculation, and the metadata object is subjected to HASH calculation to determine the hash value of the metadata object. For example, when hashing each metadata object in FIG. 1, for the current metadata object Filel or File2, when calculating the hash value, the first calculation module 20 can directly calculate Filel or File2 as the input value of HASH. The hash value of Filel or File2; and for the snapshot metadata objects Filel@snapl and Filel@snap3, when the hash value is calculated, the second calculation module 30 can use the version name Filel in the name of the snapshot metadata object as HASH. The input values calculate the hash values for Filel@snapl and Filel@snap3. Since the file values are used as HASH input values when calculating the hash values of Filel, Filel@snapl, and Filel@snap3, the calculated hash values of Filel, Filel@snapl, and Filel @snap3 are the same value. Similarly, for the metadata objects File2, File2@snapl, and File2@snap3 in Figure 1, since the hash values of File2, File2@snapl, and File2@snap3 are calculated as File2 as the input value of HASH, the calculated File2 is calculated. The hash values of File2@snapl and File2@snap3 are also the same value.
在一些可行的实施方式中,通过第一计算模块 20或者第二计算模块 30计 算得知各个元数据对象的散列值之后, 散列模块 40则可根据元数据对象的散 列值将各个元数据对象散列到相应的元数据服务节点上。具体的,散列模块 40 可通过对各个元数据对象的散列值进行处理(例如取整)将散列值相同或者相
近的元数据对象散列到同一个元数据服务器节点上, 或者将散列值大小相差较 大的元数据对象散列到不同的元数据服务器节点上等。 例如, 对图 1中的各个 元数据对象进行散列时,由于元数据对象 Filel、 Filel@snapl以及 Filel @snap3 的散列值均为同一个值, 则根据这些元数据对象的散列值进行散列时可 Filel、 Filel@snapl 以及 Filel@snap3散列到同一个元数据服务器节点上; 此外, 元 数据对象 File2、 File2@snapl 以及 File2@snap3的散列值也为同一个值, 则可 将 File2、 File2@snapl以及 File2@snap3散列到同一个元数据服务器节点上, 如图 4。 对比图 2和图 4可知, 在图 2中同一个文件的所有快照版本的元数据 对象可能被散列到不同的元数据服务器节点上,例如, Filel的快照版本的元数 据对象 Filel@snapl和 Filel@snap3可能分别被散列到节点 Dirl和节点 Dir2 上, 用户对快照数据进行访问时可能需要跨节点进行查询才能获取到完整的快 照数据; 在图 4中同一个文件的所有快照版本的元数据对象都会被散列到同一 个元数据服务器节点上, 例如 Filel 的快照版本的元数据对象 Filel@snapl和 Filel@snap3均被散列到节点 Dirl上, 用户访问某一个文件的所有快照版本时 只需要在该文件的节点查找, 只需要在该节点上进行查询即可获取完整的快照 数据,无需跨节点,减少了元数据服务器节点之间因快照访问带来的信息交互, 降低了快照访问的开销。 In some feasible implementation manners, after the hash value of each metadata object is calculated by the first computing module 20 or the second computing module 30, the hash module 40 may perform each element according to the hash value of the metadata object. The data object is hashed to the corresponding metadata service node. Specifically, the hash module 40 may treat the hash values of the respective metadata objects by processing (eg, rounding) the hash values to be the same or Nearly metadata objects are hashed to the same metadata server node, or metadata objects with large differences in hash values are hashed to different metadata server nodes. For example, when hashing each metadata object in Figure 1, since the hash values of the metadata objects Filel, Filel@snapl, and Filel @snap3 are the same value, based on the hash values of these metadata objects. Hash can be hashed to the same metadata server node by Filel, Filel@snapl, and Filel@snap3; in addition, the hash values of the metadata objects File2, File2@snapl, and File2@snap3 are the same value. Hash File2, File2@snapl, and File2@snap3 to the same metadata server node, as shown in Figure 4. Comparing Figure 2 with Figure 4, the metadata objects of all snapshot versions of the same file in Figure 2 may be hashed to different metadata server nodes, for example, the metadata version of Filel's snapshot version Filel@snapl and Filel@snap3 may be hashed to the node Dirl and the node Dir2 respectively. When the user accesses the snapshot data, it may need to query across the nodes to obtain the complete snapshot data. In Figure 4, all the snapshot versions of the same file are in the meta-version. Data objects are hashed to the same metadata server node. For example, the metadata objects Filel@snapl and Filel@snap3 of the snapshot version of Filel are hashed to the node Dirl. When the user accesses all snapshot versions of a file. It only needs to be searched in the node of the file, and only needs to query on the node to obtain complete snapshot data, without cross-node, reducing the information interaction between the metadata server nodes due to snapshot access, and reducing the snapshot access. s expenses.
本发明实施例中所描述的对元数据对象进行散列的装置主要是以元数据 对象的名称以及快照元数据对象的版本名称作为 HASH计算的输入值计算元 数据对象的散列值, 并根据计算得到的散列值将元数据对象散列至相应的元数 据服务器节点。 本发明实施例所描述的装置计算元数据对象和它的各个不同版 本的快照元数据对象的散列值时可得到相同的散列值, 进而可将当前元数据对 象和它的各个不同版本的快照元数据对象散列到同一个元数据服务器节点上, 降低元数据对象被散列到不同元数据服务器节点的随机性, 进而可提高快照数 据的访问效率, 减少了元数据服务器节点间因快照访问而增加的信息交互, 提 高快照的访问性能和系统的整体性能。 The device for hashing the metadata object described in the embodiment of the present invention mainly calculates the hash value of the metadata object by using the name of the metadata object and the version name of the snapshot metadata object as the input value of the HASH calculation, and according to The computed hash value hashes the metadata object to the corresponding metadata server node. The device described in the embodiment of the present invention can obtain the same hash value when calculating the hash value of the metadata object and its different versions of the snapshot metadata object, and thus the current metadata object and its different versions can be obtained. The snapshot metadata object is hashed to the same metadata server node, which reduces the randomness of the metadata object being hashed to different metadata server nodes, thereby improving the access efficiency of the snapshot data and reducing the snapshot between the metadata server nodes. Increased information interaction for access, improving snapshot access performance and overall system performance.
参见图 6, 是本发明实施例提供的终端的实施例结构示意图。 本实施例中 所描述的终端, 包括: FIG. 6 is a schematic structural diagram of an embodiment of a terminal according to an embodiment of the present invention. The terminal described in this embodiment includes:
存储器 100, 用于存储指令。
处理器 200, 用于从所述存储器中读取指令, 并根据所述指令执行如下操 作: 判断元数据对象是否为快照元数据对象, 若所述元数据对象不是快照元数 据对象, 则将所述元数据对象的名称作为输入值计算所述元数据对象的散列 值, 若所述元数据对象为快照元数据对象, 则将所述元数据对象的名称中的版 本名称作为输入值计算所述元数据对象的散列值,根据所述元数据对象的散列 值将所述元数据对象散列到相应的元数据服务器节点。 The memory 100 is configured to store instructions. The processor 200 is configured to read an instruction from the memory, and perform an operation according to the instruction: determining whether the metadata object is a snapshot metadata object, and if the metadata object is not a snapshot metadata object, Calculating a hash value of the metadata object as an input value, and if the metadata object is a snapshot metadata object, calculating a version name in a name of the metadata object as an input value Deriving a hash value of the metadata object, hashing the metadata object to a corresponding metadata server node according to a hash value of the metadata object.
在一些可行的实施方式中, 所述处理器 200在判断元数据对象是否为快照 元数据对象时, 具体用于: In some possible implementation manners, when determining, by the processor 200, whether the metadata object is a snapshot metadata object, the processor 200 is specifically configured to:
根据所述元数据对象的名称判断所述元数据对象的名称中是否包含快照 元数据对象的名称标识符; Determining, according to the name of the metadata object, whether the name of the metadata object includes a name identifier of the snapshot metadata object;
若判断结果为是, 则判定所述元数据对象为快照元数据对象, 若判断结果 为否, 则判定所述元数据对象不是快照元数据对象。 If the determination result is yes, it is determined that the metadata object is a snapshot metadata object, and if the determination result is no, it is determined that the metadata object is not a snapshot metadata object.
在一些可行的实施方式中, 所述处理器 200在将所述元数据对象的名称作 为输入值计算所述元数据对象的散列值时, 具体用于: In some possible implementations, when the processor 200 calculates the hash value of the metadata object as the input value, the processor 200 is specifically configured to:
将所述元数据对象的名称作为 HASH计算的输入值,对所述元数据对象进 行 HASH计算, 确定所述元数据对象的散列值。 The name of the metadata object is used as an input value of the HASH calculation, and the metadata object is subjected to HASH calculation to determine a hash value of the metadata object.
在一些可行的实施方式中, 所述处理器 200所述将所述元数据对象的名称 中的版本名称作为输入值计算所述元数据对象的散列值时, 具体用于: In some possible implementation manners, when the processor 200 calculates a hash value of the metadata object by using a version name in a name of the metadata object as an input value, specifically, the method is:
将所述元数据对象的名称中的版本名称作为 HASH计算的输入值,对所述 元数据对象进行 HASH计算, 确定所述元数据对象的散列值。 The version name in the name of the metadata object is used as an input value of the HASH calculation, and the metadata object is subjected to HASH calculation to determine a hash value of the metadata object.
具体实现中, 本发明实施例中所描述的快照元数据对象为元数据对象被快 照保护时生成的元数据对象的快照版本, 其中, 一个普通元数据对象生成的快 照版本可包括多个, 本实施例中所描述的元数据服务器节点下的普通的元数据 对象可包括: 文件、 目录等。 如图 1 , 其中的 Filel和 File2即为本发明实施例 中所描述的元数据服务器节点 Dir 下的普通的元数据对象, 图 1 中的 Filel @snapl、 Filel@snap3 即为元数据对象 Filel 生成的快照元数据对象, File2@snapl、 File2@snap3即为元数据对象 File2生成的快照元数据对象; 其 中 Filel和 File2为元数据服务器节点 Dir下的两个元数据对象, Filel@snapl 和 Filel@snap3 为 Filel 生成的相同版本的不同版本号的快照元数据对象,
据对象。 具体实现中, 快照元数据对象的名称空间是系统唯一的, 各个快照元 数据对象的名称的命名规则也是唯一确定的。 在一些可行的实施方式中, 快照 元数据对象的名称的命名规则可为: 版本名称 +分界符 +版本号, 即快照元数据 对象的名称的组成包括: 版本名称 +分界符 +版本号, 其中, 分界符可为 "@"。 例如, 在快照元数据对象 Filel@snapl中, Filel为该快照元数据对象的版本名 称, @为分界符, snapl为版本号。 In a specific implementation, the snapshot metadata object described in the embodiment of the present invention is a snapshot version of the metadata object generated when the metadata object is protected by the snapshot, where the snapshot version generated by one common metadata object may include multiple, Common metadata objects under the metadata server node described in the embodiments may include: files, directories, and the like. As shown in FIG. 1, Filel and File2 are ordinary metadata objects under the metadata server node Dir described in the embodiment of the present invention, and Filel @snapl and Filel@snap3 in FIG. 1 are generated by the metadata object Filel. The snapshot metadata object, File2@snapl, File2@snap3, is the snapshot metadata object generated by the metadata object File2; Filel and File2 are the two metadata objects under the metadata server node Dir, Filel@snapl and Filel@ Snap3 is a snapshot metadata object of the same version with different version numbers generated by Filel. According to the object. In a specific implementation, the namespace of the snapshot metadata object is unique to the system, and the naming rules of the names of the respective snapshot metadata objects are also uniquely determined. In some possible implementation manners, the naming rule of the name of the snapshot metadata object may be: a version name + a delimiter + a version number, that is, a composition of a name of the snapshot metadata object includes: a version name + a delimiter + a version number, where The delimiter can be "@". For example, in the snapshot metadata object Filel@snapl, Filel is the version name of the snapshot metadata object, @ is the delimiter, and snapl is the version number.
在一些可行的实施方式中, 为了使得任一元数据服务器节点下的同一个文 件(或者目录)的所有快照版本被散列到同一个元数据服务器节点, 使得用户 在访问该文件的快照元数据对象时, 只需要在同一个元数据服务器节点查找这 些快照元数据对象, 无需跨节点查询, 处理器 200对同一个文件的所有快照元 数据对象进行散列时可以以相同的名称作为元数据对象散列计算的输入值, 计 算各个元数据对象的散列值, 再根据散列值对各个元数据对象进行散列。 具体 实现中, 处理器 200对元数据对象进行散列时可先判断元数据对象是否为快照 元数据对象, 如果是快照元数据对象, 则以该元数据对象的名称中的版本名称 作为输入值, 计算该元数据对象的散列值, 如果不是快照元数据对象, 则可判 断得知该元数据对象为普通的元数据对象, 进而可将该元数据对象的名称作为 输入值计算该元数据对象的散列值。 具体的, 处理器 200判断元数据对象是否 为快照元数据对象时可根据元数据对象的名称判断该元数据对象的名称中是 否包含快照元数据对象的名称标识符, 其中, 快照元数据对象的名称标识符具 体可为快照元数据对象的名称中的分界符 (例如 @ ), 如果判断得知该元数据 对象的名称中包含快照元数据对象的名称中的分界符, 则可判断得知该元数据 对象为快照元数据对象,如果该元数据对象的名称中不包含快照元数据的对象 的名称中的分界符, 则可判断得知该元数据对象不是快照元数据对象, 而是当 前的元数据对象。 具体实现中, 处理器 200将当前的元数据对象的名称作为输 入值计算该元数据对象的散列值时具体为将该元数据对象的名称作为 HASH 计算的输入值,对该元数据对象进行 HASH计算,确定该元数据对象的散列值; 处理器 200计算快照元数据对象的散列值时则可将快照元数据对象的名称中的 版本名称作为 HASH计算的输入值, 对该元数据对象进行 HASH计算, 确定
该元数据对象的散列值。 例如, 对图 1中的各个元数据对象进行散列时, 对于 当前的元数据对象 Filel或者 File2,处理器 200计算其散列值时可直接以 Filel 或者 File2作为 HASH的输入值计算 Filel或者 File2的散列值; 而对于快照元 数据对象 Filel@snapl和 Filel@snap3 , 处理器 200计算其散列值时则可以其 名称中的版本名称 Filel作为 HASH的输入值计算 Filel@snapl和 Filel@snap3 的散列值。 由于处理器 200计算 Filel、 Filel@snapl以及 Filel@snap3的散列 值时均以 Filel作为 HASH的输入值, 则计算得到的 Filel、 Filel@snapl以及 Filel@snap3的散列值均为同一个值。 同理, 对于图 1中的元数据对象 File2、 File2@snapl以及 File2@snap3 , 由于处理器 200计算 File2、 File2@snapl以及 File2@snap3的散列值均以 File2作为 HASH的输入值, 则计算得到的 File2、 File2@snapl以及 File2@snap3的散列值也均为同一个值。 In some possible implementations, in order to cause all snapshot versions of the same file (or directory) under any metadata server node to be hashed to the same metadata server node, the user accesses the snapshot metadata object of the file. Only need to find these snapshot metadata objects in the same metadata server node, without cross-node query, the processor 200 can hash all the snapshot metadata objects of the same file with the same name as the metadata object. The input value of the column calculation, the hash value of each metadata object is calculated, and each metadata object is hashed according to the hash value. In a specific implementation, when the processor 200 hashes the metadata object, it may first determine whether the metadata object is a snapshot metadata object, and if it is a snapshot metadata object, use the version name in the name of the metadata object as an input value. Calculating a hash value of the metadata object. If it is not a snapshot metadata object, determining that the metadata object is an ordinary metadata object, and then calculating the metadata by using the name of the metadata object as an input value. The hash value of the object. Specifically, the processor 200 determines whether the metadata object is a snapshot metadata object, and determines, according to the name of the metadata object, whether the name of the metadata object includes a name identifier of the snapshot metadata object, where the snapshot metadata object is The name identifier may specifically be a delimiter in the name of the snapshot metadata object (for example, @ ). If it is determined that the name of the metadata object includes a delimiter in the name of the snapshot metadata object, it may be determined that the identifier is The metadata object is a snapshot metadata object. If the name of the metadata object does not include a delimiter in the name of the object of the snapshot metadata, it may be determined that the metadata object is not a snapshot metadata object, but the current Metadata object. In a specific implementation, when the processor 200 calculates the hash value of the metadata object by using the name of the current metadata object as an input value, specifically, the name of the metadata object is used as an input value calculated by HASH, and the metadata object is performed on the metadata object. HASH calculation, determining a hash value of the metadata object; when the processor 200 calculates a hash value of the snapshot metadata object, the version name in the name of the snapshot metadata object may be used as an input value of the HASH calculation, and the metadata is The object performs HASH calculation, determining The hash value of this metadata object. For example, when hashing each metadata object in FIG. 1, for the current metadata object File1 or File2, when the processor 200 calculates its hash value, it can directly calculate Filel or File2 by using Filel or File2 as the input value of HASH. For the snapshot metadata objects Filel@snapl and Filel@snap3, when the processor 200 calculates its hash value, the version name Filel in its name can be used as the input value of HASH to calculate Filel@snapl and Filel@snap3. The hash value. Since the processor 200 calculates the hash values of Filel, Filel@snapl, and Filel@snap3 with Filel as the input value of HASH, the calculated hash values of Filel, Filel@snapl, and Filel@snap3 are the same value. . Similarly, for the metadata objects File2, File2@snapl, and File2@snap3 in FIG. 1, since the processor 200 calculates the hash values of File2, File2@snapl, and File2@snap3 using File2 as the input value of HASH, the calculation is performed. The obtained hash values of File2, File2@snapl, and File2@snap3 are also the same value.
在一些可行的实施方式中, 处理器 200计算得知各个元数据对象的散列值 之后则可根据元数据对象的散列值将各个元数据对象散列到相应的元数据服 务节点上。具体的,处理器 200可通过对各个元数据对象的散列值进行处理(例 如取整 )将散列值相同或者相近的元数据对象散列到同一个元数据服务器节点 上, 或者将散列值大小相差较大的元数据对象散列到不同的元数据服务器节点 上等。 例如, 对图 1中的各个元数据对象进行散列时, 由于元数据对象 Filel、 Filel@snapl 以及 Filel @snap3 的散列值均为同一个值, 则根据这些元数据对 象的散列值进行散列时可 Filel、 Filel@snapl以及 Filel @snap3散列到同一个 元数据服务器节点上; 此外,元数据对象 File2、 File2@snapl以及 File2@snap3 的散列值也为同一个值, 则可将 File2、 File2@snapl以及 File2@snap3散列到 同一个元数据服务器节点上, 如图 4。 对比图 2和图 4可知, 在图 2中同一个 文件的所有快照版本的元数据对象可能被散列到不同的元数据服务器节点上, 例如, Filel的快照版本的元数据对象 Filel@snapl和 Filel@snap3可能分别被 散列到节点 Dirl和节点 Dir2上, 用户对快照数据进行访问时可能需要跨节点 进行查询才能获取到完整的快照数据; 在图 4中同一个文件的所有快照版本的 元数据对象都会被散列到同一个元数据服务器节点上, 例如 Filel 的快照版本 的元数据对象 Filel @snapl和 Filel@snap3均被散列到节点 Dirl上, 用户访问 某一个文件的所有快照版本时只需要在该文件的节点查找, 只需要在该节点上
进行查询即可获取完整的快照数据, 无需跨节点, 减少了元数据服务器节点之 间因快照访问带来的信息交互, 降低了快照访问的开销。 In some feasible implementation manners, after the processor 200 calculates the hash value of each metadata object, each of the metadata objects may be hashed according to the hash value of the metadata object to the corresponding metadata service node. Specifically, the processor 200 may hash the metadata objects with the same or similar hash values to the same metadata server node by processing (eg, rounding) the hash values of the respective metadata objects, or hashing Metadata objects with large differences in value are hashed to different metadata server nodes, and so on. For example, when hashing each metadata object in Figure 1, since the hash values of the metadata objects Filel, Filel@snapl, and Filel @snap3 are the same value, the hash values of these metadata objects are used. When hashing, Filel, Filel@snapl, and Filel @snap3 are hashed to the same metadata server node; in addition, the hash values of the metadata objects File2, File2@snapl, and File2@snap3 are the same value. Hash File2, File2@snapl, and File2@snap3 to the same metadata server node, as shown in Figure 4. Comparing Figure 2 with Figure 4, the metadata objects of all snapshot versions of the same file in Figure 2 may be hashed to different metadata server nodes, for example, the metadata version of Filel's snapshot version Filel@snapl and Filel@snap3 may be hashed to the node Dirl and the node Dir2 respectively. When the user accesses the snapshot data, it may need to query across the nodes to obtain the complete snapshot data. In Figure 4, all the snapshot versions of the same file are in the meta-version. Data objects are hashed to the same metadata server node. For example, the metadata objects Filel @snapl and Filel@snap3 of the snapshot version of Filel are hashed to the node Dirl. When the user accesses all snapshot versions of a file. Just need to look up the node of the file, only need to be on that node By querying, the complete snapshot data can be obtained without cross-nodes, which reduces the information interaction between the metadata server nodes due to snapshot access, and reduces the overhead of snapshot access.
本发明实施例中所描述的终端可以元数据对象的名称以及快照元数据对 象的版本名称作为 HASH计算的输入值计算元数据对象的散列值,并根据计算 得到的散列值将元数据对象散列至相应的元数据服务器节点。在本发明实施例 所描述的终端中计算元数据对象和它的各个不同版本的快照元数据对象的散 列值时可得到相同的散列值, 进而可将当前元数据对象和它的各个不同版本的 快照元数据对象散列到同一个元数据服务器节点上, 降低元数据对象被散列到 不同元数据服务器节点的随机性, 进而可提高快照数据的访问效率, 减少了元 数据服务器节点间因快照访问而增加的信息交互,提高快照的访问性能和系统 的整体性能。 The terminal described in the embodiment of the present invention may calculate the hash value of the metadata object by using the name of the metadata object and the version name of the snapshot metadata object as the input value of the HASH calculation, and the metadata object according to the calculated hash value. Hash to the corresponding metadata server node. When the hash value of the metadata object and its different versions of the snapshot metadata object is calculated in the terminal described in the embodiment of the present invention, the same hash value can be obtained, and the current metadata object can be different from each other. The version of the snapshot metadata object is hashed to the same metadata server node, reducing the randomness of the metadata object being hashed to different metadata server nodes, thereby improving the access efficiency of the snapshot data and reducing the metadata server node Increased information interaction due to snapshot access, improving snapshot access performance and overall system performance.
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程, 是可以通过计算机程序来指令相关的硬件来完成, 所述的程序可存储于计算机 可读取存储介质中, 该程序在执行时, 可包括如上述各方法的实施例的流程。 其中, 所述的存储介质可为磁碟、光盘、只读存储记忆体(Read-Only Memory, ROM )或随机存储记忆体(Random Access Memory, RAM )等。 以上所揭露的仅为本发明较佳实施例而已, 当然不能以此来限定本发明之 权利范围,因此依本发明权利要求所作的等同变化,仍属本发明所涵盖的范围。
A person skilled in the art can understand that all or part of the process of implementing the above embodiment method can be completed by a computer program to instruct related hardware, and the program can be stored in a computer readable storage medium, and the program is When executed, the flow of an embodiment of the methods as described above may be included. The storage medium may be a magnetic disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM). The above is only the preferred embodiment of the present invention, and the scope of the present invention is not limited thereto, and thus equivalent changes made in the claims of the present invention are still within the scope of the present invention.
Claims
1、 一种对元数据对象进行散列的方法, 其特征在于, 包括: 判断元数据对象是否为快照元数据对象; 1. A method for hashing metadata objects, characterized by: determining whether the metadata object is a snapshot metadata object;
若所述元数据对象不是快照元数据对象, 则将所述元数据对象的名称 作为输入值计算所述元数据对象的散列值; If the metadata object is not a snapshot metadata object, use the name of the metadata object as the input value to calculate the hash value of the metadata object;
若所述元数据对象为快照元数据对象, 则将所述元数据对象的名称中 的版本名称作为输入值计算所述元数据对象的散列值; If the metadata object is a snapshot metadata object, use the version name in the name of the metadata object as an input value to calculate the hash value of the metadata object;
根据所述元数据对象的散列值将所述元数据对象散列到相应的元数据 服务器节点。 The metadata object is hashed to the corresponding metadata server node according to the hash value of the metadata object.
2、 如权利要求 1所述的方法, 其特征在于, 所述快照元数据对象为元 数据对象被快照保护时生成的元数据对象的快照版本; 2. The method of claim 1, wherein the snapshot metadata object is a snapshot version of the metadata object generated when the metadata object is protected by a snapshot;
所述快照元数据对象的名称的组成包括: 版本名称 +分界符 +版本号。 The name of the snapshot metadata object consists of: version name + delimiter + version number.
3、 如权利要求 2所述的方法, 其特征在于, 所述判断元数据对象是否 为快照元数据对象, 包括: 3. The method of claim 2, wherein the determining whether the metadata object is a snapshot metadata object includes:
判断所述元数据对象的名称中是否包含快照元数据对象的名称标识 付; Determine whether the name of the metadata object contains the name identifier of the snapshot metadata object;
若判断结果为是, 则判定所述元数据对象为快照元数据对象, 若判断 结果为否, 则判定所述元数据对象不是快照元数据对象。 If the judgment result is yes, it is judged that the metadata object is a snapshot metadata object; if the judgment result is no, it is judged that the metadata object is not a snapshot metadata object.
4、 如权利要求 1-3任意一项所述的方法, 其特征在于, 所述将所述元 数据对象的名称作为输入值计算所述元数据对象的散列值, 包括: 4. The method according to any one of claims 1 to 3, characterized in that, using the name of the metadata object as an input value to calculate the hash value of the metadata object includes:
将所述元数据对象的名称作为 HASH计算的输入值, 对所述元数据对 象进行 HASH计算, 确定所述元数据对象的散列值。 The name of the metadata object is used as the input value of the HASH calculation, the HASH calculation is performed on the metadata object, and the hash value of the metadata object is determined.
5、 如权利要求 1-3任意一项所述的方法, 其特征在于, 所述将所述元 数据对象的名称中的版本名称作为输入值计算所述元数据对象的散列值, 包括:
将所述元数据对象的名称中的版本名称作为 HASH计算的输入值, 对 所述元数据对象进行 HASH计算, 确定所述元数据对象的散列值。 5. The method according to any one of claims 1 to 3, characterized in that, using the version name in the name of the metadata object as an input value to calculate the hash value of the metadata object includes: The version name in the name of the metadata object is used as the input value of the HASH calculation, the HASH calculation is performed on the metadata object, and the hash value of the metadata object is determined.
6、 一种对元数据对象进行散列的装置, 其特征在于, 包括: 判断模块, 用于判断元数据对象是否为快照元数据对象; 6. A device for hashing metadata objects, characterized in that it includes: a judgment module, used to judge whether the metadata object is a snapshot metadata object;
第一计算模块, 用于在判断模块判断结果为否时, 将所述元数据对象 的名称作为输入值计算所述元数据对象的散列值; The first calculation module is configured to use the name of the metadata object as an input value to calculate the hash value of the metadata object when the judgment result of the judgment module is no;
第二计算模块, 用于在判断模块判断结果为是时, 将所述元数据对象 的名称中的版本名称作为输入值计算所述元数据对象的散列值; The second calculation module is configured to use the version name in the name of the metadata object as an input value to calculate the hash value of the metadata object when the judgment result of the judgment module is yes;
散列模块, 用于根据所述元数据对象的散列值将所述元数据对象散列 到相应的元数据服务器节点。 A hashing module, configured to hash the metadata object to the corresponding metadata server node according to the hash value of the metadata object.
7、 如权利要求 6所述的装置, 其特征在于, 所述快照元数据对象为元 数据对象被快照保护时生成的元数据对象的快照版本; 7. The device of claim 6, wherein the snapshot metadata object is a snapshot version of the metadata object generated when the metadata object is snapshot protected;
所述快照元数据对象的名称的组成包括: 版本名称 +分界符 +版本号。 The name of the snapshot metadata object consists of: version name + delimiter + version number.
8、 如权利要求 7所述的装置, 其特征在于, 所述判断模块在判断元数 据对象是否为快照元数据对象时, 具体用于: 8. The device according to claim 7, wherein the judgment module is specifically used to: when judging whether the metadata object is a snapshot metadata object:
判断所述元数据对象的名称中是否包含快照元数据对象的名称标识 符, 若判断结果为是, 则判定所述元数据对象为快照元数据对象, 若判断 结果为否, 则判定所述元数据对象不是快照元数据对象。 Determine whether the name of the metadata object contains the name identifier of the snapshot metadata object. If the determination result is yes, then determine that the metadata object is a snapshot metadata object. If the determination result is no, then determine that the metadata object is a snapshot metadata object. The data object is not a snapshot metadata object.
9、 如权利要求 6-8任意一项所述的装置, 其特征在于, 所述第一计算 模块将所述元数据对象的名称作为输入值计算所述元数据对象的散列值 时, 具体用于: 9. The device according to any one of claims 6-8, wherein when the first calculation module uses the name of the metadata object as an input value to calculate the hash value of the metadata object, specifically: Used for:
将所述元数据对象的名称作为 HASH计算的输入值, 对所述元数据对 象进行 HASH计算, 确定所述元数据对象的散列值。 The name of the metadata object is used as the input value of the HASH calculation, the HASH calculation is performed on the metadata object, and the hash value of the metadata object is determined.
10、 如权利要求 6-8任意一项所述的装置, 其特征在于, 所述第二计算
模块将所述元数据对象的名称中的版本名称作为输入值计算所述元数据对 象的散列值时, 具体用于: 10. The device according to any one of claims 6 to 8, characterized in that, the second calculation When the module uses the version name in the name of the metadata object as an input value to calculate the hash value of the metadata object, it is specifically used for:
将所述元数据对象的名称中的版本名称作为 HASH计算的输入值, 对 所述元数据对象进行 HASH计算, 确定所述元数据对象的散列值。
The version name in the name of the metadata object is used as the input value of the HASH calculation, the HASH calculation is performed on the metadata object, and the hash value of the metadata object is determined.
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201310493842.0 | 2013-10-18 | ||
CN201310493842.0A CN103559224A (en) | 2013-10-18 | 2013-10-18 | Method and device for hashing metadata objects |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2015055035A1 true WO2015055035A1 (en) | 2015-04-23 |
Family
ID=50013471
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2014/083044 WO2015055035A1 (en) | 2013-10-18 | 2014-07-25 | Method and device for hashing metadata object |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN103559224A (en) |
WO (1) | WO2015055035A1 (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US10037339B1 (en) | 2017-12-28 | 2018-07-31 | Dropbox, Inc. | Synchronized organization directory with team member folders |
CN111723050A (en) * | 2019-03-22 | 2020-09-29 | 伊姆西Ip控股有限责任公司 | Method, electronic device and computer program product for file management |
Families Citing this family (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103559224A (en) * | 2013-10-18 | 2014-02-05 | 华为技术有限公司 | Method and device for hashing metadata objects |
US10423495B1 (en) * | 2014-09-08 | 2019-09-24 | Veritas Technologies Llc | Deduplication grouping |
US10896165B2 (en) * | 2017-05-03 | 2021-01-19 | International Business Machines Corporation | Management of snapshot in blockchain |
CN110032553B (en) * | 2019-04-08 | 2021-04-06 | 中国人民大学 | DNA generation and verification method of data object |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101162469A (en) * | 2007-11-09 | 2008-04-16 | 清华大学 | Fine grit document and catalogs version management method based on snapshot |
US20110087696A1 (en) * | 2005-01-20 | 2011-04-14 | F5 Networks, Inc. | Scalable system for partitioning and accessing metadata over multiple servers |
WO2012036757A1 (en) * | 2010-09-13 | 2012-03-22 | Marvell World Trade Ltd. | Distributed metadata cache |
CN102411637A (en) * | 2011-12-30 | 2012-04-11 | 创新科软件技术(深圳)有限公司 | Metadata management method of distributed file system |
CN103150394A (en) * | 2013-03-25 | 2013-06-12 | 中国人民解放军国防科学技术大学 | Distributed file system metadata management method facing to high-performance calculation |
CN103559224A (en) * | 2013-10-18 | 2014-02-05 | 华为技术有限公司 | Method and device for hashing metadata objects |
Family Cites Families (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7228320B2 (en) * | 2004-11-17 | 2007-06-05 | Hitachi, Ltd. | System and method for creating an object-level snapshot in a storage system |
CN101639835A (en) * | 2008-07-30 | 2010-02-03 | 国际商业机器公司 | Method and device for partitioning application database in multi-tenant scene |
CN102122285B (en) * | 2010-01-11 | 2012-10-31 | 卓望数码技术(深圳)有限公司 | Data cache system and data inquiry method |
CN101980203A (en) * | 2010-10-29 | 2011-02-23 | 中国科学院声学研究所 | Embedded file system for high-definition media |
CN103019960B (en) * | 2012-12-03 | 2016-03-30 | 华为技术有限公司 | Distributed caching method and system |
-
2013
- 2013-10-18 CN CN201310493842.0A patent/CN103559224A/en active Pending
-
2014
- 2014-07-25 WO PCT/CN2014/083044 patent/WO2015055035A1/en active Application Filing
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20110087696A1 (en) * | 2005-01-20 | 2011-04-14 | F5 Networks, Inc. | Scalable system for partitioning and accessing metadata over multiple servers |
CN101162469A (en) * | 2007-11-09 | 2008-04-16 | 清华大学 | Fine grit document and catalogs version management method based on snapshot |
WO2012036757A1 (en) * | 2010-09-13 | 2012-03-22 | Marvell World Trade Ltd. | Distributed metadata cache |
CN102411637A (en) * | 2011-12-30 | 2012-04-11 | 创新科软件技术(深圳)有限公司 | Metadata management method of distributed file system |
CN103150394A (en) * | 2013-03-25 | 2013-06-12 | 中国人民解放军国防科学技术大学 | Distributed file system metadata management method facing to high-performance calculation |
CN103559224A (en) * | 2013-10-18 | 2014-02-05 | 华为技术有限公司 | Method and device for hashing metadata objects |
Cited By (53)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US11010402B2 (en) | 2017-12-28 | 2021-05-18 | Dropbox, Inc. | Updating a remote tree for a client synchronization service |
US11782949B2 (en) | 2017-12-28 | 2023-10-10 | Dropbox, Inc. | Violation resolution in client synchronization |
US10324903B1 (en) | 2017-12-28 | 2019-06-18 | Dropbox, Inc. | Content management client synchronization service |
US10599673B2 (en) | 2017-12-28 | 2020-03-24 | Dropbox, Inc. | Content management client synchronization service |
US10671638B2 (en) | 2017-12-28 | 2020-06-02 | Dropbox, Inc. | Allocation and reassignment of unique identifiers for synchronization of content items |
US10691720B2 (en) | 2017-12-28 | 2020-06-23 | Dropbox, Inc. | Resynchronizing metadata in a content management system |
US10691719B2 (en) | 2017-12-28 | 2020-06-23 | Dropbox, Inc. | Cursor with last observed access state |
US10691721B2 (en) | 2017-12-28 | 2020-06-23 | Dropbox, Inc. | Restrictive access control list |
US10726044B2 (en) | 2017-12-28 | 2020-07-28 | Dropbox, Inc. | Atomic moves with lamport clocks in a content management system |
US10733205B2 (en) | 2017-12-28 | 2020-08-04 | Dropbox, Inc. | Violation resolution in client synchronization |
US10762104B2 (en) | 2017-12-28 | 2020-09-01 | Dropbox, Inc. | File journal interface for synchronizing content |
US10776386B2 (en) | 2017-12-28 | 2020-09-15 | Dropbox, Inc. | Content management client synchronization service |
US10789269B2 (en) | 2017-12-28 | 2020-09-29 | Dropbox, Inc. | Resynchronizing metadata in a content management system |
US11880384B2 (en) | 2017-12-28 | 2024-01-23 | Dropbox, Inc. | Forced mount points / duplicate mounts |
US10789268B2 (en) | 2017-12-28 | 2020-09-29 | Dropbox, Inc. | Administrator console for an organization directory |
US10866964B2 (en) | 2017-12-28 | 2020-12-15 | Dropbox, Inc. | Updating a local tree for a client synchronization service |
US10866963B2 (en) | 2017-12-28 | 2020-12-15 | Dropbox, Inc. | File system authentication |
US10872098B2 (en) | 2017-12-28 | 2020-12-22 | Dropbox, Inc. | Allocation and reassignment of unique identifiers for synchronization of content items |
US10877993B2 (en) | 2017-12-28 | 2020-12-29 | Dropbox, Inc. | Updating a local tree for a client synchronization service |
US10922333B2 (en) | 2017-12-28 | 2021-02-16 | Dropbox, Inc. | Efficient management of client synchronization updates |
US10929427B2 (en) | 2017-12-28 | 2021-02-23 | Dropbox, Inc. | Selective synchronization of content items in a content management system |
US10929426B2 (en) | 2017-12-28 | 2021-02-23 | Dropbox, Inc. | Traversal rights |
US10936622B2 (en) | 2017-12-28 | 2021-03-02 | Dropbox, Inc. | Storage interface for synchronizing content |
US10949445B2 (en) | 2017-12-28 | 2021-03-16 | Dropbox, Inc. | Content management client synchronization service |
US10037339B1 (en) | 2017-12-28 | 2018-07-31 | Dropbox, Inc. | Synchronized organization directory with team member folders |
US11003685B2 (en) | 2017-12-28 | 2021-05-11 | Dropbox, Inc. | Commit protocol for synchronizing content items |
US10997200B2 (en) | 2017-12-28 | 2021-05-04 | Dropbox, Inc. | Synchronized organization directory with team member folders |
US10095879B1 (en) | 2017-12-28 | 2018-10-09 | Dropbox, Inc. | Restrictive access control list |
US11669544B2 (en) | 2017-12-28 | 2023-06-06 | Dropbox, Inc. | Allocation and reassignment of unique identifiers for synchronization of content items |
US11080297B2 (en) | 2017-12-28 | 2021-08-03 | Dropbox, Inc. | Incremental client synchronization |
US11120039B2 (en) | 2017-12-28 | 2021-09-14 | Dropbox, Inc. | Updating a remote tree for a client synchronization service |
US11176164B2 (en) | 2017-12-28 | 2021-11-16 | Dropbox, Inc. | Transition to an organization directory |
US11188559B2 (en) | 2017-12-28 | 2021-11-30 | Dropbox, Inc. | Directory snapshots with searchable file paths |
US11204938B2 (en) | 2017-12-28 | 2021-12-21 | Dropbox, Inc. | Caching of file system warning queries to determine an applicable file system warning |
US11308118B2 (en) | 2017-12-28 | 2022-04-19 | Dropbox, Inc. | File system warnings |
US11314774B2 (en) | 2017-12-28 | 2022-04-26 | Dropbox, Inc. | Cursor with last observed access state |
US11386116B2 (en) | 2017-12-28 | 2022-07-12 | Dropbox, Inc. | Prevention of loss of unsynchronized content |
US11423048B2 (en) | 2017-12-28 | 2022-08-23 | Dropbox, Inc. | Content management client synchronization service |
US11429634B2 (en) | 2017-12-28 | 2022-08-30 | Dropbox, Inc. | Storage interface for synchronizing content |
US11461365B2 (en) | 2017-12-28 | 2022-10-04 | Dropbox, Inc. | Atomic moves with lamport clocks in a content management system |
US11475041B2 (en) | 2017-12-28 | 2022-10-18 | Dropbox, Inc. | Resynchronizing metadata in a content management system |
US11500899B2 (en) | 2017-12-28 | 2022-11-15 | Dropbox, Inc. | Efficient management of client synchronization updates |
US11500897B2 (en) | 2017-12-28 | 2022-11-15 | Dropbox, Inc. | Allocation and reassignment of unique identifiers for synchronization of content items |
US11514078B2 (en) | 2017-12-28 | 2022-11-29 | Dropbox, Inc. | File journal interface for synchronizing content |
US11593394B2 (en) | 2017-12-28 | 2023-02-28 | Dropbox, Inc. | File system warnings application programing interface (API) |
US11630841B2 (en) | 2017-12-28 | 2023-04-18 | Dropbox, Inc. | Traversal rights |
US11657067B2 (en) | 2017-12-28 | 2023-05-23 | Dropbox Inc. | Updating a remote tree for a client synchronization service |
US11048720B2 (en) | 2017-12-28 | 2021-06-29 | Dropbox, Inc. | Efficiently propagating diff values |
US11704336B2 (en) | 2017-12-28 | 2023-07-18 | Dropbox, Inc. | Efficient filename storage and retrieval |
US11755616B2 (en) | 2017-12-28 | 2023-09-12 | Dropbox, Inc. | Synchronized organization directory with team member folders |
US11016991B2 (en) | 2017-12-28 | 2021-05-25 | Dropbox, Inc. | Efficient filename storage and retrieval |
US11836151B2 (en) | 2017-12-28 | 2023-12-05 | Dropbox, Inc. | Synchronizing symbolic links |
CN111723050A (en) * | 2019-03-22 | 2020-09-29 | 伊姆西Ip控股有限责任公司 | Method, electronic device and computer program product for file management |
Also Published As
Publication number | Publication date |
---|---|
CN103559224A (en) | 2014-02-05 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US20230359644A1 (en) | Cloud-based replication to cloud-external systems | |
US9983825B2 (en) | Efficient data volume replication for block-based storage | |
WO2015055035A1 (en) | Method and device for hashing metadata object | |
US9703803B2 (en) | Replica identification and collision avoidance in file system replication | |
KR101862718B1 (en) | Reducing data volume durability state for block-based storage | |
US9792306B1 (en) | Data transfer between dissimilar deduplication systems | |
US8694469B2 (en) | Cloud synthetic backups | |
US9274716B2 (en) | Systems and methods for hierarchical reference counting via sibling trees | |
US9684669B2 (en) | Single instantiation method using file clone and file storage system utilizing the same | |
US9727273B1 (en) | Scalable clusterwide de-duplication | |
WO2017201977A1 (en) | Data writing and reading method and apparatus, and distributed object storage cluster | |
WO2013163832A1 (en) | Cloud storage method and device | |
WO2015039569A1 (en) | Copy storage device and copy storage method | |
WO2014205847A1 (en) | Zoning balance subtask delivering method, apparatus and system | |
CN114780252B (en) | Resource management method and device of data warehouse system | |
JP2019537097A (en) | Tracking I-node access patterns and prefetching I-nodes | |
US20190215363A1 (en) | Dynamic pool-based tiering for synchronization storage | |
US9684668B1 (en) | Systems and methods for performing lookups on distributed deduplicated data systems | |
US10496493B1 (en) | Method and system for restoring applications of particular point in time | |
WO2017145214A1 (en) | Computer system for transferring data from center node to edge node | |
WO2019174558A1 (en) | Data indexing method and device | |
WO2020151337A1 (en) | Distributed file processing method and apparatus, computer device and storage medium | |
US10684786B2 (en) | Methods for performing global deduplication on data blocks and devices thereof | |
US11531644B2 (en) | Fractional consistent global snapshots of a distributed namespace | |
US20220197860A1 (en) | Hybrid snapshot of a global namespace |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 14853601 Country of ref document: EP Kind code of ref document: A1 |
|
NENP | Non-entry into the national phase |
Ref country code: DE |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 14853601 Country of ref document: EP Kind code of ref document: A1 |