CN107704462A - Metadata maintaining method, equipment and the storage device of resource - Google Patents
Metadata maintaining method, equipment and the storage device of resource Download PDFInfo
- Publication number
- CN107704462A CN107704462A CN201610642192.5A CN201610642192A CN107704462A CN 107704462 A CN107704462 A CN 107704462A CN 201610642192 A CN201610642192 A CN 201610642192A CN 107704462 A CN107704462 A CN 107704462A
- Authority
- CN
- China
- Prior art keywords
- resource
- daily record
- timestamp
- node
- host node
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
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/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/22—Indexing; Data structures therefor; Storage structures
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/21—Design, administration or maintenance of databases
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Databases & Information Systems (AREA)
- Data Mining & Analysis (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Software Systems (AREA)
- Telephonic Communication Services (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
The purpose of the application is to provide metadata maintaining method, equipment and the storage device of a kind of resource, by being main and subordinate node the metadata cutting of resource, the routing iinformation of resource is recorded and safeguarded in host node, realize that resource name is globally unique, Resource Properties are being safeguarded from node, realize the metadata High Availabitity of resource, the application is suitable for use with the distributed memory system that cluster provides storage service, realize in resource under more regions, it should ensure that resource name is globally unique, ensure the metadata High Availabitity of resource again.In addition, during by creating or delete resource, in the establishment of host node more new resources or the timestamp of deletion resource, one daily record of persistence simultaneously, the daily record includes the routing iinformation identical resource name and timestamp with the resource, and the remaining routing iinformation generated under abnormal scene on remaining host node can be deleted according to daily record inspection.
Description
Technical field
The application is related to computer realm, more particularly to metadata maintaining method, equipment and the storage device of a kind of resource.
Background technology
In cloud storage system, generally it is required for ensureing resource name global uniqueness, this is generally by resource
Meta-data preservation realized on a common node, ensured on common node by affairs.But under this structure such as
Fruit common node is unable to normal service, and all requests for accessing metadata can all be affected, and have a strong impact on the availability of system.
In addition, the communication quality of different geographical can not ensure, or even can not can service completely, and common node can only be deployed in one
Region, this when, other regions can not ensure the access request of common node, and availability can be poor.This when is commonly used
Means be the metadata resource by region cutting.
All it is at present to remove global node by region cutting metadata, assigns each region as a completely self-contained system
System, each region preserve respective metadata respectively, completely isolated between each region.And for the globally unique of resource name
Property, ensure global uniqueness or globally unique using one generally by the information that region is enclosed inside resource name
Character string represent.The resource name of this mode can only ensure in some region uniquely, if to access in the overall situation, to need
Want affix regional information or use a very long alias.This when, a resource have two names, easily allow user
Obscure, and can easily malfunction, ease for use is very poor.
The content of the invention
The purpose of the application is to provide metadata maintaining method, equipment and the storage device of a kind of resource, can solve
The problem of certainly metadata availability of resource is poor, or resource name is not global unique.
According to the one side of the application, there is provided a kind of metadata maintaining method of resource, the metadata of the resource
Routing iinformation and Resource Properties including resource, this method include:
The routing iinformation of resource is safeguarded in host node, corresponding to positional information of the Resource Properties in the Resource Properties
Safeguarded from node, the routing iinformation of the resource includes the positional information of globally unique resource name and Resource Properties.
Further, in the above method, the routing iinformation of the resource also includes the timestamp for creating or deleting resource;
The routing iinformation of resource is safeguarded in host node, corresponding to positional information of the Resource Properties in the Resource Properties
Safeguarded from node, including:
According to the establishment or the timestamp of deletion resource, the remaining route when host node is deleted and creates and delete resource
Information, safeguarded from node corresponding to positional information of the Resource Properties in the Resource Properties.Further, the above method
In, according to the establishment or the timestamp of deletion resource, the remaining routing iinformation when host node is deleted and creates and delete resource,
Safeguarded corresponding to positional information of the Resource Properties in the Resource Properties from node, including:
When creating or deleting resource, the timestamp of establishment or the deletion resource, while persistence one are updated in host node
Bar daily record, the daily record include the routing iinformation identical resource name and timestamp with the resource, and Resource Properties are described
Safeguarded corresponding to the positional information of Resource Properties from node;
According to the timestamp and the daily record for creating or deleting resource, when host node deletes establishment and the deletion resource
Remaining routing iinformation.
Further, in the above method, during establishing resource, host node more new resources establishment or delete time of resource
Stamp, while one daily record of persistence, safeguarded corresponding to positional information of the Resource Properties in the Resource Properties, wrapped from node
Include:
When asking the routing iinformation of establishing resource, the routing iinformation that the resource is inquired about in host node whether there is,
If being not present, the routing iinformation of the resource, and one daily record of persistence simultaneously, the resource are created in host node
Routing iinformation include the resource name, the Resource Properties positional information and it is described establishment or deletion resource time
Stamp;
The Resource Properties are being created from node according to the positional information of the resource name and the resource, if the money
Source attribute creates failure, returns to asset creation failure;If creating successfully, asset creation success is returned to, and will create or delete money
The timestamp in source is compared with the timestamp in the daily record of same asset title, if identical, deletes this daily record.
Further, in the above method, when asking the routing iinformation of establishing resource, the road of the resource is inquired about in host node
After whether there is by information, in addition to:
If in the presence of judging the positional informations of the Resource Properties in the routing iinformation of the resource, if create money with request
The positional information of source attribute is different,
If it is different, return to asset creation failure.
Further, in the above method, the routing iinformation of the resource also includes user, judges the route letter of the resource
The positional information of Resource Properties in breath, if after the positional information difference with asking establishing resource attribute, in addition to:
If identical, judge whether the request is initiated by same user,
If so, then update the establishment of the resource in host node or delete the timestamp of resource, and persistence one simultaneously
Daily record;
The Resource Properties are being created from node according to the positional information of the resource name and the resource, if the money
Source attribute creates failure, returns to asset creation failure;If creating successfully, asset creation success is returned to, and will create or delete money
The timestamp in source is compared with the timestamp in the daily record of same asset title, if identical, deletes this daily record.
Further, in the above method, when deleting resource, in the establishment of host node more new resources or the time of deletion resource
Stamp, while one daily record of persistence, safeguarded corresponding to positional information of the Resource Properties in the Resource Properties, wrapped from node
Include:
When the routing iinformation of resource is deleted in request, the routing iinformation that the resource is inquired about in host node whether there is,
If in the presence of updating the establishment of the resource in host node or delete the timestamp of resource, and persistence one simultaneously
Daily record;
According to the routing iinformation of resource from Resource Properties described in knot removal, if the Resource Properties delete failure, return
Return resource and delete failure;If deleting successfully, return resource is deleted successfully, and will create or delete the timestamp of resource and identical money
Timestamp in the daily record of source name is compared, if identical, deletes this daily record.
Further, in the above method, according to the timestamp and the daily record for creating or deleting resource, deleted in host node
Remaining routing iinformation during establishment and the deletion resource, including:
Still existing daily record is scanned beyond after preset time;
According to the daily record scanned, routing iinformation remaining during establishment and the deletion resource is deleted.
Further, in the above method, according to the daily record scanned, road remaining during establishment and the deletion resource is deleted
By information, including:
It whether there is in the routing iinformation that host node inquiry has same asset title with the daily record scanned,
If being not present, the daily record is deleted.
Further, in the above method, after the routing iinformation of host node inquiry same asset title whether there is, also
Including:
If in the presence of, judge the timestamp of the daily record and the establishment of the same asset title inquired or delete resource when
Between stab it is whether identical,
If differing, the daily record is deleted.
Further, in the above method, the timestamp of the daily record and the establishment of the same asset title inquired are judged
Or delete resource timestamp it is whether identical after, in addition to:
If identical, the Resource Properties in the corresponding inquiry from node with the presence or absence of same asset title,
If in the presence of deleting the daily record.
Further, in the above method, in corresponding resource category of the inquiry with the presence or absence of same asset title from node
After property, in addition to:
If being not present, judge that the timestamp of the daily record provides with the establishment of the same asset title inquired or deletion again
Whether the timestamp in source is identical;
If identical, the daily record and routing iinformation are deleted.
Further, in the above method, the timestamp of the daily record and the same asset title inquired are judged again
After whether the timestamp of establishment or deletion resource is identical, in addition to:
If differing, the daily record is deleted.
Further, in the above method, Resource Properties are being safeguarded from node, in addition to:
After in the establishment from node or deletion Resource Properties success, it will create or delete the establishment of resource or delete money
The timestamp in source is saved in from node in the Resource Properties;
When the request for the attribute for receiving establishment or deletion to same resource again from node, the money of current request is judged
Whether the establishment in source or the timestamp of deletion resource are more than the timestamp in the Resource Properties preserved from node,
If so, the request is being handled from node;
If it is not, ignoring the request from node.
According to the another side of the application, a kind of metadata maintaining method of resource, the metadata bag of the resource are also provided
The routing iinformation and Resource Properties of resource are included, this method includes:
Host node obtains the request of the routing iinformation of establishing resource, and whether the routing iinformation of query resource is deposited in host node
Include globally unique resource name, the positional information of Resource Properties and establishment in the routing iinformation of, the resource or delete money
The timestamp in source;
If being not present, host node creates the routing iinformation of the resource, and after one daily record of persistence simultaneously, according to described
The positional information of resource name and the resource to initiating to create the request of the Resource Properties from node, the daily record include with
The routing iinformation identical resource name and timestamp of the resource;
The Resource Properties are created from node according to the request of the establishment Resource Properties received, if the resource category
Property create failure, to host node return asset creation failure.
Further, in the above method, from node according to creating the request of the establishment Resource Properties received
After Resource Properties, in addition to:
If creating successfully, returning to asset creation to host node successfully feeds back;
Host node successfully feeds back according to the asset creation, by the establishment in the routing iinformation of the resource or deletes
Except the timestamp of resource is compared with the timestamp in the daily record of same asset title, if identical, this daily record is deleted.
Further, in the above method, host node inquires about the routing iinformation of the resource after host node whether there is,
Also include:
If in the presence of the host node judges the positional information of the Resource Properties in the routing iinformation of the resource, if with
The positional information difference of Resource Properties created is asked,
If it is different, the host node returns to asset creation failure to described from node.
Further, in the above method, the routing iinformation of the resource also includes user,
Host node judges the positional information of the Resource Properties in the routing iinformation of the resource, if with asking establishing resource
After the positional information difference of attribute, in addition to:
If identical, host node judges whether the request of the establishing resource attribute is initiated by same user,
If so, the then timestamp of the host node renewal establishment or deletion resource, and after one daily record of persistence simultaneously, root
According to the positional information of the resource name and the resource to the request from node initiation establishing resource attribute;
The Resource Properties are created from node according to the request of the establishing resource attribute, are lost if the Resource Properties create
Lose, asset creation failure is returned to the host node.
Further, in the above method, the Resource Properties are created from node according to the request of the establishing resource attribute
Afterwards, in addition to:
If creating successfully, after returning to asset creation success to the host node, the host node is by the establishment or deletion
The timestamp of resource is compared with the timestamp in the daily record of same asset title, if identical, deletes this daily record.
Further, in the above method, if identical, after deleting this daily record, including:
The host node is scanned beyond after preset time still existing daily record;
The host node deletes routing iinformation remaining during establishment and the deletion resource according to the daily record scanned.
Further, in the above method, the host node deletes establishment and the deletion resource according to the daily record scanned
When remaining routing iinformation, including:
The routing iinformation that host node inquiry has same asset title with the daily record scanned whether there is,
If being not present, host node deletes the daily record.
Further, in the above method, host node inquiry has the road of same asset title with the daily record scanned
After whether there is by information, in addition to:
If judge the timestamp of the daily record and the establishment of the same asset title inquired in the presence of, the host node or delete
Except whether the timestamp of resource is identical,
If differing, the host node deletes the daily record.
Further, in the above method, the host node judges the timestamp of the daily record and the same asset inquired
After whether the establishment of title or the timestamp of deletion resource are identical, in addition to:
If identical, host node initiates inquiry with the presence or absence of identical to corresponding according to the positional information of Resource Properties from node
The request of the Resource Properties of resource name, from node according to it is described inquiry with the presence or absence of same asset title Resource Properties please
Ask and inquired about,
If in the presence of, it is described from node to the host node send Resource Properties existing for feedback, the host node according to
The existing feedback of the Resource Properties deletes the daily record.
Further, in the above method, the Resource Properties from node according to the inquiry with the presence or absence of same asset title
Request inquired about after, in addition to:
It is described that the feedback that Resource Properties are not present, the host node root are sent from node to the host node if being not present
The feedback being not present according to the Resource Properties, the timestamp of the daily record and the wound of the same asset title inquired are judged again
Whether the timestamp for building or deleting resource is identical;
If identical, the host node deletes the daily record and routing iinformation.
Further, in the above method, the host node judges that the timestamp of the daily record is identical with what is inquired again
After whether the establishment of resource name or the timestamp of deletion resource are identical, in addition to:
If differing, the host node deletes the daily record.
According to the another side of the application, a kind of metadata maintaining method of resource, the metadata bag of the resource are also provided
The routing iinformation and Resource Properties of resource are included, this method includes:
Host node obtains the request for the routing iinformation for deleting resource, is looked into according to the request of the routing iinformation of the deletion resource
The routing iinformation for asking the resource whether there is, and the routing iinformation of the resource includes globally unique resource name, resource category
Property positional information and create or delete resource timestamp,
If in the presence of, the timestamp of the host node renewal establishment or deletion resource, and after one daily record of persistence simultaneously, to
Initiate to delete the request of Resource Properties from node;
It is described that the Resource Properties are deleted according to the request of the deletion Resource Properties received from node, if the money
Source attribute deletes failure, and returning to resource to the host node deletes failure.
Further, it is described to be deleted from node according to the request of the deletion Resource Properties received in the above method
After the Resource Properties, in addition to:
If delete successfully, to the host node return resource deletes successfully, and by it is described create or delete resource time
Stamp, if identical, deletes this daily record compared with the timestamp in the daily record of same asset title.
Further, in the above method, if identical, after deleting this daily record, including:
The host node is scanned beyond after preset time still existing daily record;
The host node deletes routing iinformation remaining during establishment and the deletion resource according to the daily record scanned.
Further, in the above method, the host node deletes establishment and the deletion resource according to the daily record scanned
When remaining routing iinformation, including:
The routing iinformation that host node inquiry has same asset title with the daily record scanned whether there is,
If being not present, host node deletes the daily record.
Further, in the above method, host node inquiry has the road of same asset title with the daily record scanned
After whether there is by information, in addition to:
If judge the timestamp of the daily record and the establishment of the same asset title inquired in the presence of, the host node or delete
Except whether the timestamp of resource is identical,
If differing, the host node deletes the daily record.
Further, in the above method, the host node judges the timestamp of the daily record and the same asset inquired
After whether the establishment of title or the timestamp of deletion resource are identical, in addition to:
If identical, host node initiates inquiry with the presence or absence of identical to corresponding according to the positional information of Resource Properties from node
The request of the Resource Properties of resource name, from node according to it is described inquiry with the presence or absence of same asset title Resource Properties please
Ask and inquired about,
If in the presence of, it is described from node to the host node send Resource Properties existing for feedback, the host node according to
The existing feedback of the Resource Properties deletes the daily record.
Further, in the above method, the Resource Properties from node according to the inquiry with the presence or absence of same asset title
Request inquired about after, in addition to:
It is described that the feedback that Resource Properties are not present, the host node root are sent from node to the host node if being not present
The feedback being not present according to the Resource Properties, the timestamp of the daily record and the wound of the same asset title inquired are judged again
Whether the timestamp for building or deleting resource is identical;
If identical, the host node deletes the daily record and routing iinformation.
Further, in the above method, the host node judges that the timestamp of the daily record is identical with what is inquired again
After whether the establishment of resource name or the timestamp of deletion resource are identical, in addition to:
If differing, the host node deletes the daily record.
According to the another aspect of the application, a kind of metadata maintained equipment of resource, first number of the resource are additionally provided
According to routing iinformation and Resource Properties including resource, the equipment includes:
Attending device, for the routing iinformation of resource to be safeguarded in host node, the routing iinformation of the resource includes
Globally unique resource name and the positional information of Resource Properties;Resource Properties are corresponding in the positional information of the Resource Properties
Safeguarded from node.
Further, in the said equipment, the routing iinformation of the resource also includes the timestamp for creating or deleting resource, institute
Attending device is stated, it is residual when host node is deleted and creates and delete resource for the timestamp according to the establishment or deletion resource
Remaining routing iinformation, safeguarded from node corresponding to positional information of the Resource Properties in the Resource Properties.
Further, in the said equipment, the attending device, including:
Create attending device, in establishing resource, host node more new resources establishment or delete time of resource
Stamp, while one daily record of persistence, the daily record include the routing iinformation identical resource name and timestamp with the resource,
Safeguarded corresponding to positional information of the Resource Properties in the Resource Properties from node;
Attending device is deleted, for when deleting resource, in the establishment of host node more new resources or the time of deletion resource
Stamp, while one daily record of persistence, the daily record include the routing iinformation identical resource name and timestamp with the resource,
Safeguarded corresponding to positional information of the Resource Properties in the Resource Properties from node;
Scanning means, for according to the timestamp and the daily record for creating or deleting resource, the wound to be deleted in host node
Build and delete routing iinformation remaining during resource.
Further, in the said equipment, the establishment attending device, during routing iinformation for asking establishing resource,
The routing iinformation that host node inquires about the resource whether there is,
If being not present, the routing iinformation of the resource, and one daily record of persistence simultaneously are created in host node;
The Resource Properties are being created from node according to the positional information of the resource name and the resource, if the money
Source attribute creates failure, returns to asset creation failure;If creating successfully, asset creation success is returned to, and will create or delete money
The timestamp in source is compared with the timestamp in the daily record of same asset title, if identical, deletes this daily record.
Further, in the said equipment, attending device is created, when being additionally operable to ask the routing iinformation of establishing resource, in master
After the routing iinformation of resource described in querying node whether there is,
If in the presence of judging the positional informations of the Resource Properties in the routing iinformation of the resource, if create money with request
The positional information of source attribute is different,
If it is different, return to asset creation failure.
Further, in the said equipment, the routing iinformation of the resource also includes user, creates attending device, is additionally operable to
The positional information of Resource Properties in the routing iinformation for judging the resource, if with asking the position of establishing resource attribute to be believed
After breath is different, if identical, judge whether the request is initiated by same user,
If so, then update the establishment of the resource in host node or delete the timestamp of resource, and persistence one simultaneously
Daily record;
The Resource Properties are being created from node according to the positional information of the resource name and the resource, if the money
Source attribute creates failure, returns to asset creation failure;If creating successfully, asset creation success is returned to, and will create or delete money
The timestamp in source is compared with the timestamp in the daily record of same asset title, if identical, deletes this daily record.
Further, in the said equipment, the deletion attending device, when deleting the routing iinformation of resource for request,
The routing iinformation that host node inquires about the resource whether there is,
If in the presence of updating the establishment of the resource in host node or delete the timestamp of resource, and persistence one simultaneously
Daily record;
According to the routing iinformation of resource from Resource Properties described in knot removal, if the Resource Properties delete failure, return
Return resource and delete failure;If deleting successfully, return resource is deleted successfully, and will create or delete the timestamp of resource and identical money
Timestamp in the daily record of source name is compared, if identical, deletes this daily record.
Further, in the said equipment, the scanning means, for being scanned beyond after preset time still existing day
Will;
According to the daily record scanned, routing iinformation remaining during establishment and the deletion resource is deleted.
Further, in the said equipment, the scanning means, for having in host node inquiry and the daily record scanned
The routing iinformation for having same asset title whether there is,
If being not present, the daily record is deleted.
Further, in the said equipment, the scanning means, it is additionally operable to the route in host node inquiry same asset title
After information whether there is,
If in the presence of, judge the timestamp of the daily record and the establishment of the same asset title inquired or delete resource when
Between stab it is whether identical,
If differing, the daily record is deleted.
Further, in the said equipment, the scanning means, it is additionally operable to judge the timestamp of the daily record and inquires
After whether the establishment of same asset title or the timestamp of deletion resource are identical,
If identical, the Resource Properties in the corresponding inquiry from node with the presence or absence of same asset title,
If in the presence of deleting the daily record.
Further, in the said equipment, the scanning means, it is additionally operable to whether there is phase in the corresponding inquiry from node
After the Resource Properties of resource name,
If being not present, judge that the timestamp of the daily record provides with the establishment of the same asset title inquired or deletion again
Whether the timestamp in source is identical;
If identical, the daily record and routing iinformation are deleted.
Further, in the said equipment, the scanning means, it is additionally operable to judge again timestamp and the inquiry of the daily record
After whether the establishment of the same asset title arrived or the timestamp of deletion resource are identical,
If differing, the daily record is deleted.
Further, in the said equipment, the attending device, it is additionally operable to when in the establishment from node or deletion Resource Properties
After success, the establishment for creating or deleting resource or the timestamp for deleting resource are saved in the Resource Properties from node
In;
When the request for the attribute for receiving establishment or deletion to same resource again from node, the money of current request is judged
Whether the establishment in source or the timestamp of deletion resource are more than the timestamp in the Resource Properties preserved from node,
If so, the request is being handled from node;
If it is not, ignoring the request from node.
According to the another side of the application, a kind of metadata maintained equipment of resource is also provided, wherein, first number of the resource
According to routing iinformation and Resource Properties including resource, the equipment includes:
Host node, the request of the routing iinformation for obtaining establishing resource, the routing iinformation of query resource are in host node
No presence, the routing iinformation of the resource include globally unique resource name, the positional information of Resource Properties and establishment or deleted
Except the timestamp of resource;If being not present, the routing iinformation of the resource is created, and after one daily record of persistence simultaneously, according to institute
State the positional information of resource name and the resource includes to the request that the establishment Resource Properties are initiated from node, the daily record
With the routing iinformation identical resource name and timestamp of the resource;
From node, for creating the Resource Properties according to the request of the establishment Resource Properties received, if described
Resource Properties create failure, and asset creation failure is returned to host node.
Preferably, it is described from node in the said equipment, it is additionally operable in asking according to the establishment Resource Properties received
Ask after creating the Resource Properties, if creating successfully, returning to asset creation to host node successfully feeds back;
The host node, it is additionally operable to successfully be fed back according to the asset creation, by the routing iinformation of the resource
The timestamp of establishment or the deletion resource, if identical, is deleted compared with the timestamp in the daily record of same asset title
Except this daily record.
Preferably, in the said equipment, the host node, be additionally operable to be in host node in the routing iinformation for inquiring about the resource
After no presence, if in the presence of the host node judges the positional information of the Resource Properties in the routing iinformation of the resource, if
It is different from the positional information for the Resource Properties that request creates, if it is different, returning to asset creation failure from node to described.
Preferably, in the said equipment, the routing iinformation of the resource also includes user,
The host node, the positional information for the Resource Properties for being additionally operable to judge in the routing iinformation of the resource, if with
After the positional information difference for asking establishing resource attribute, if identical, judge the request of the establishing resource attribute whether by same
One user initiates, if so, the timestamp of establishment or the deletion resource is then updated, and after one daily record of persistence simultaneously, according to
The positional information of the resource name and the resource to from node initiate establishing resource attribute request;
It is described from node, be additionally operable to create the Resource Properties according to the request of the establishing resource attribute, if the money
Source attribute creates failure, and asset creation failure is returned to the host node.
Preferably, it is described from node in the said equipment, it is additionally operable to creating institute according to the request of the establishing resource attribute
After stating Resource Properties, if creating successfully, after returning to asset creation success to the host node,
The host node, it is additionally operable in the daily record of the timestamp and same asset title of the establishment or deletion resource
Timestamp is compared, if identical, deletes this daily record.
Preferably, in the said equipment, if the host node is additionally operable to identical, after deleting this daily record, scanning is super
Cross still existing daily record after preset time;According to the daily record scanned, road remaining during establishment and the deletion resource is deleted
By information.
Preferably, in the said equipment, the host node, being additionally operable to inquiry and the daily record scanned has same asset
The routing iinformation of title whether there is, if being not present, host node deletes the daily record.
Preferably, in the said equipment, the host node, it is additionally operable to that there is identical money with the daily record scanned in inquiry
After the routing iinformation of source name whether there is, the timestamp of the daily record and the establishment of the same asset title inquired are judged
Or whether the timestamp of deletion resource is identical, if differing, deletes the daily record.
Preferably, in the said equipment, the host node, it is additionally operable to judging the timestamp of the daily record and the phase inquired
With resource name establishment or delete resource timestamp it is whether identical after, if identical, according to the positional information of Resource Properties
To corresponding request of the inquiry with the presence or absence of the Resource Properties of same asset title is initiated from node;
The request of the Resource Properties for from node, being additionally operable to whether there is same asset title according to the inquiry is carried out
Inquiry, if in the presence of to feedback existing for host node transmission Resource Properties;
The host node, it is additionally operable to the feedback according to existing for the Resource Properties and deletes the daily record.
Preferably, it is described to be additionally operable to whether there is same asset title according to the inquiry from node in the said equipment
Resource Properties request inquired about after, if being not present, the feedback that is not present of Resource Properties is sent to the host node;
The host node, the feedback being not present according to the Resource Properties is additionally operable to, judges the time of the daily record again
Whether the establishment for the same asset title stabbed and inquired or the timestamp of deletion resource are identical;If identical, the daily record is deleted
And routing iinformation.
Preferably, in the said equipment, the host node, it is additionally operable to judging the timestamp of the daily record with inquiring again
Same asset title establishment or delete resource timestamp it is whether identical after, if differing, delete the daily record.
According to the another side of the application, a kind of metadata maintained equipment of resource, the metadata bag of the resource are also provided
The routing iinformation and Resource Properties of resource are included, the equipment includes:
Host node, for obtaining the request for the routing iinformation for deleting resource, according to the routing iinformation of the deletion resource
The routing iinformation of resource described in requesting query whether there is, the routing iinformation of the resource include globally unique resource name,
The positional informations of Resource Properties and the timestamp for creating or deleting resource, if in the presence of, update establishment or the deletion resource when
Between stab, and after one daily record of persistence simultaneously, to initiating to delete the request of Resource Properties from node;
The Resource Properties are deleted in the request of the deletion Resource Properties from node, received for basis, if
The Resource Properties delete failure, and returning to resource to the host node deletes failure.
Preferably, it is described from node in the said equipment, it is additionally operable in asking according to the deletion Resource Properties received
Ask after deleting the Resource Properties, if deleting successfully, deleted successfully to host node return resource, and create described or
The timestamp of resource is deleted compared with the timestamp in the daily record of same asset title, if identical, deletes this daily record.
Preferably, in the said equipment, the host node, if being additionally operable to identical, after deleting this daily record, scanning is super
Cross still existing daily record after preset time;According to the daily record scanned, road remaining during establishment and the deletion resource is deleted
By information.
Preferably, in the said equipment, the host node, be additionally operable to according to the daily record scanned, delete the establishment and
Delete routing iinformation remaining during resource, inquiry and the daily record scanned have same asset title routing iinformation whether
In the presence of if being not present, deleting the daily record.
Preferably, in the said equipment, host node, it is additionally operable to that there is same asset name with the daily record scanned in inquiry
After the routing iinformation of title whether there is, if in the presence of the host node judges that the timestamp of the daily record is identical with what is inquired
Whether the establishment of resource name or the timestamp of deletion resource are identical, if differing, delete the daily record.
Preferably, in the said equipment, the host node, it is additionally operable to judging the timestamp of the daily record and the phase inquired
With resource name establishment or delete resource timestamp it is whether identical after, if identical, according to the positional information of Resource Properties
To corresponding request of the inquiry with the presence or absence of the Resource Properties of same asset title is initiated from node;
The request of the Resource Properties for from node, being additionally operable to whether there is same asset title according to the inquiry is carried out
Inquiry, if in the presence of described that feedback existing for Resource Properties is sent from node to the host node;
The host node, it is additionally operable to the feedback according to existing for the Resource Properties and deletes the daily record.
Preferably, it is described from node in the said equipment, it is additionally operable to whether there is same asset title according to the inquiry
Resource Properties request inquired about after, if being not present, the feedback that is not present of Resource Properties is sent to the host node;
The host node, the feedback being not present according to the Resource Properties is additionally operable to, judges the time of the daily record again
Whether the establishment for the same asset title stabbed and inquired or the timestamp of deletion resource are identical;If identical, the daily record is deleted
And routing iinformation.
Preferably, in the said equipment, the host node, it is additionally operable to judging the timestamp of the daily record with inquiring again
Same asset title establishment or delete resource timestamp it is whether identical after, if differing, delete the daily record.
According to the another side of the application, a kind of metadata storage device of resource, the metadata bag of the resource are also provided
The routing iinformation and Resource Properties of resource are included, wherein, described device includes:
Host node, for storing the routing iinformation of the resource, the routing iinformation of the resource includes globally unique money
The positional information of source name and Resource Properties;From node, for storing the Resource Properties.
Preferably, in said apparatus, the routing iinformation of the resource also includes the timestamp for creating or deleting resource.
Preferably, in said apparatus, the host node also includes daily record, and the daily record includes believing with the route of the resource
Cease identical resource name and timestamp.
Compared with prior art, the application is by being main and subordinate node the metadata cutting of resource, in host node to resource
Routing iinformation recorded and safeguarded, realize resource name it is globally unique, Resource Properties are being safeguarded from node, realize
The metadata High Availabitity of resource, the application are suitable for use with the distributed memory system that cluster provides storage service, realized
Resource should ensure that resource name is globally unique, ensure the metadata High Availabitity of resource again under more regions.In addition, pass through
When creating or deleting resource, host node more new resources establishment or delete the timestamp of resource, while one daily record of persistence,
The daily record includes the routing iinformation identical resource name and timestamp with the resource, can be deleted according to daily record inspection residual
The remaining routing iinformation generated under abnormal scene on remaining host node.
Brief description of the drawings
By reading the detailed description made to non-limiting example made with reference to the following drawings, the application's is other
Feature, objects and advantages will become more apparent upon:
Fig. 1 shows the metadata structure figure of the resource of a preferred embodiment in the application;
Fig. 2 shows the flow chart of the preferred embodiment of metadata maintaining method one of resource in the application;
Fig. 3 shows the flow chart of another preferred embodiment of metadata maintaining method of resource in the application;
Fig. 4 shows the flow chart of the another preferred embodiment of metadata maintaining method of resource in the application.
Same or analogous reference represents same or analogous part in accompanying drawing.
Embodiment
The application is described in further detail below in conjunction with the accompanying drawings.
In one typical configuration of the application, terminal, the equipment of service network and trusted party include one or more
Processor (CPU), input/output interface, network interface and internal memory.
Internal memory may include computer-readable medium in volatile memory, random access memory (RAM) and/or
The forms such as Nonvolatile memory, such as read-only storage (ROM) or flash memory (flash RAM).Internal memory is computer-readable medium
Example.
Computer-readable medium includes permanent and non-permanent, removable and non-removable media can be by any method
Or technology come realize information store.Information can be computer-readable instruction, data structure, the module of program or other data.
The example of the storage medium of computer includes, but are not limited to phase transition internal memory (PRAM), static RAM (SRAM), moved
State random access memory (DRAM), other kinds of random access memory (RAM), read-only storage (ROM), electric erasable
Programmable read only memory (EEPROM), fast flash memory bank or other memory techniques, read-only optical disc read-only storage (CD-ROM),
Digital versatile disc (DVD) or other optical storages, magnetic cassette tape, magnetic disk storage or other magnetic storage apparatus or
Any other non-transmission medium, the information that can be accessed by a computing device available for storage.Defined according to herein, computer
Computer-readable recording medium does not include non-temporary computer readable media (transitory media), such as the data-signal and carrier wave of modulation.
According to the one side of the application, there is provided a kind of metadata maintaining method of resource, the metadata bag of the resource
The routing iinformation and Resource Properties of resource are included, this method includes:
Step S1, the routing iinformation of resource are safeguarded that Resource Properties are believed in the position of the Resource Properties in host node
Safeguarded corresponding to breath from node, wherein, the routing iinformation of the resource includes resource name (bucket) and Resource Properties
Where (bucket meta) from node, the metadata of the resource includes the routing iinformation and attribute of resource.Specifically, from
Node is the region/region (region) divided by geographical position, and the node of each region is referred to as (public from node, host node
Node) be all regions common node, for preserving the region belonging to resource, i.e., where resource from node, routing iinformation
It is corresponding from node, the routing iinformation (bucket of the resource for host node inquiry for recording the region belonging to resource
Route) include resource name (bucket) and where Resource Properties (meta) from node.Read and write Resource Properties (bucket
Meta) only need to access from node, creating and delete the request of resource needs to access host node simultaneously and from node.It is here, logical
It is main and subordinate node to cross the metadata cutting of resource, and the routing iinformation of resource is recorded and safeguarded in host node, realizes money
Source name is globally unique, Resource Properties is being safeguarded from node, realize the metadata High Availabitity of resource, the application is applied to
In the distributed memory system that storage service is provided using cluster, realize in resource under more regions, should ensure that resource is named
It is globally unique, ensure the metadata High Availabitity of resource again.
In the preferred embodiment of metadata maintaining method one of the resource of the application, the routing iinformation of the resource also includes
The timestamp of resource is created or deletes, the routing iinformation of resource is safeguarded that Resource Properties are in the Resource Properties in host node
Positional information corresponding to safeguarded from node, including:
According to the establishment or the timestamp of deletion resource, the remaining route when host node is deleted and creates and delete resource
Information, safeguarded corresponding to positional information of the Resource Properties in the Resource Properties, be easy to subsequently according to timestamp from node
The routing iinformation of suppressing exception, it is further ensured that the globally unique of resource name.
In the preferred embodiment of metadata maintaining method one of the resource of the application, step S1, according to the establishment or delete
Except the timestamp of resource, the remaining routing iinformation when host node is deleted and creates and delete resource, Resource Properties are in the resource
Safeguarded corresponding to the positional information of attribute from node, including:
Step S11, during establishing resource, host node more new resources establishment or delete the timestamp (mtime) of resource, together
When one daily record of persistence, the daily record includes routing iinformation identical resource name and timestamp with the resource, resource
Safeguarded corresponding to positional information of the attribute in the Resource Properties from node;
Step S12, when deleting resource, in the establishment of host node more new resources or the timestamp of deletion resource, while persistently
Change a daily record, the daily record includes the routing iinformation identical resource name and timestamp with the resource, and Resource Properties exist
Safeguarded corresponding to the positional information of the Resource Properties from node., all can be here, to creating each time and deletion action
While host node renewal creates or deletes timestamp (mtime) of resource, the operation of the corresponding identical time stamp of persistence one
Daily record (oplog), for subsequently deleted according to daily record inspection on remaining host node generated under abnormal scene it is remaining
Routing iinformation, during one daily record of persistence each time, timestamp in daily record and this establishment or the day updated when deleting resource
The timestamp of will is consistent.For example, as shown in figure 1, the form of routing iinformation may be configured as (bucket, region,
Mtime), the form of corresponding daily record may be configured as (bucket, region, mtime).
Establishing resource is divided into three steps, and the request of establishing resource will be sent on host node:
The first step:
In order to ensure that resource name is globally unique, the routing iinformation for the resource that inquiry request creates whether there is, according to knot
Fruit is divided into three kinds of situations:The first situation, routing iinformation (bucket route) is present, but region/region in routing iinformation
(region) and this request region/region (region) it is different, or in routing iinformation user (user) and this ask
User (user) it is different;Second of situation, bucket route are present, and region in bucket route and this
The region of request is identical, and the user recorded in existing bucket route and this user asked are same
User;The third situation, bucket route are not present.For the first situation, failure is directly returned to, for second of feelings
Condition, it is newest to update the timestamp in bucket route information, for the third situation, increases a bucket route letter newly
Breath.Timestamp that renewal and needing during newly-increased bucket route preserves in persistence one oplog, oplog simultaneously and this
Timestamp is identical in renewal or newly-increased bucket route.In addition, newly-increased or renewal bucket route and persistence oplog
Need in same affairs, so as to ensure atomicity that is newly-increased or updating bucket route and the oplog of persistence simultaneously,
Either i.e. newly-increased or renewal and persistence are all successful, or it is all unsuccessful.
Second step:
For second and the third situation, it is necessary to initiate establishment operation requests from node to corresponding.
3rd step:
For second and the third situation, if corresponding returned from node fails, user's failure is returned to.It is if corresponding
Returned successfully from node, return to user's success, then compare in bucket route persistence in timestamp and the first step
Whether the timestamp inside oplog is identical, if identical, deletes oplog.
As shown in Fig. 2 in the preferred embodiment of metadata maintaining method one of the resource of the application, step S11, money is created
During source, host node more new resources establishment or delete the timestamp of resource, while one daily record of persistence, including:
Step S111, when asking the routing iinformation of establishing resource, host node inquire about the resource routing iinformation whether
In the presence of,
If being not present, step S112, the routing iinformation of the resource, and one day of persistence simultaneously are created in host node
Will;
Step S113, the resource category is being created from node according to the positional information of the resource name and the resource
Property, if the Resource Properties create failure, step S114, return to asset creation failure;If creating successfully, step S115, return
Asset creation success, and the timestamp for creating or deleting resource is compared with the timestamp in the daily record of same asset title
Compared with if identical, step S116, then deleting this daily record.Here, the present embodiment is the third feelings for above-mentioned establishing resource
Condition, bucket route are not present, then increase a bucket route information newly.If create or delete the timestamp and phase of resource
It is identical with the timestamp in the daily record of resource name, illustrate that main and subordinate node creates success, the bucket route are not abnormal
Bucket route, its corresponding oplog need not retain again, then should delete its corresponding oplog.The present embodiment
In, it is to create road letter in host node in the establishment of host node more new resources or the timestamp of deletion resource because resource is not present
Timestamp in breath, it is a kind of special update of time stamp.
As shown in Fig. 2 in the preferred embodiment of metadata maintaining method one of the resource of the application, step S111, request
During the routing iinformation of establishing resource, after the routing iinformation of the host node inquiry resource whether there is, in addition to:
If in the presence of, step S117, judge the positional information of the Resource Properties in the routing iinformation of the resource, if with please
Ask the positional information of establishing resource attribute different,
If it is different, step S118, returns to asset creation failure.Here, the present embodiment is first for upper establishing resource
Kind of situation, routing iinformation (bucket route) are present, but region/region (region) in routing iinformation and this ask
Region/region (region) is different, and such case illustrates that bucket route have been present, if existing bucket
Region in route is Beijing, and the region this time asked is Shanghai, then illustrates that bucket route are occupied,
The bucket route in Shanghai can not be re-used as, and it is probably via Beijing from node that this, which has had bucket route,
Create the bucket route successfully, being used, it is also possible to be do not create success from node by Beijing, do not using
Bucket route, it is follow-up to need after being deleted, the bucket route used could be created from node for other.
In the preferred embodiment of metadata maintaining method one of the resource of the application, the routing iinformation of the resource also includes
User.Here, the routing iinformation of the resource also includes the user (user) belonging to resource, that is, it is by which to represent the resource
User asks what is created, is easy to whether follow-up checks request to create is initiated by same user, is further ensured that the overall situation of resource only
One property.Here, the form of routing iinformation may be configured as (bucket, region, mtime, user).
As shown in Fig. 2 in the preferred embodiment of metadata maintaining method one of the resource of the application, step S117, judge
The positional information of Resource Properties in the routing iinformation of the resource, if different from asking the positional information of establishing resource attribute
Afterwards, in addition to:
If identical, step S119 judges whether the request is initiated by same user,
If so, step S1191, then update the establishment of the resource in host node or delete the timestamp of resource, and simultaneously
One daily record of persistence;
Step 1192, the resource category is being created from node according to the positional information of the resource name and the resource
Property, if the Resource Properties create failure, step S1193, return to asset creation failure;If creating successfully, step S1194, return
Asset creation success is returned, and the timestamp for creating or deleting resource is compared with the timestamp in the daily record of same asset title
Compared with if identical, step S1195, then deleting this daily record.Specifically, the present embodiment is second be directed in above-mentioned establishing resource
Kind situation, bucket route are present, and the region in bucket route is identical with the region that this is asked, and
The user recorded in existing bucket route and the user of this request are same user, then carry out same user
To same resource repeat the processing of establishment;In addition, if be different user, then with the processing method of the first above-mentioned situation
It is identical, directly return and create failure.
Identical with bucket is created, deleting bucket requests needs to be sent on host node, substantially including following three step:
The first step:
Host node judges that bucket route whether there is, if bucket route are present, renewal bucket route
Timestamp be the newest time, while one oplog of persistence and is created identical during bucket oplog forms;
Second step:
To the corresponding request that deletion bucket meta are initiated from node;
3rd step:
Host node is received after the result of node, if request failure, returns to user's failure;If asked successfully,
User's success is returned, then deletes bucket route and the oplog of first step persistence.
As shown in figure 3, in the preferred embodiment of metadata maintaining method one of the resource of the application, step S12, money is deleted
During source, host node more new resources establishment or delete the timestamp of resource, while one daily record of persistence, Resource Properties are in institute
Safeguarded corresponding to the positional information for stating Resource Properties from node, including:
Step S121, when the routing iinformation of resource is deleted in request, host node inquire about the resource routing iinformation whether
In the presence of,
If in the presence of, step S122, update the establishment of the resource in host node or delete the timestamp of resource, and hold simultaneously
Daily record of longization;
Step S123, according to the routing iinformation of resource from Resource Properties described in knot removal, if the Resource Properties are deleted
Except failure, step S124, return to resource and delete failure;If deleting successfully, step S125, return to resource and delete successfully, and will wound
The timestamp of resource is built or deleted compared with the timestamp in the daily record of same asset title, if identical, step S126, then
Delete this daily record.Here, after resource is deleted successfully, because bucket meta have deleted success, corresponding bucket
Route and oplog is not used, so be deleted, after preventing bucket meta from deleting, corresponding bucket
Route is held over by unnecessary.In addition, in order to judge whether bucket route are updated, if without updated,
Then create or delete resource timestamp it is identical with the timestamp in the daily record of same asset title, delete bucket route with
Oplog, if bucket route have been updated over, create or delete in the timestamp of resource and the daily record of same asset title
Timestamp differs, then only deletes oplog.
Oplog is recorded, is bucket route remaining when creating and delete bucket for deleting, e.g. for wound
Bucket route successes are built, but meta corresponding to establishment does not have successful situation, either, deletes meta successes, but delete
Corresponding bucket route do not have successful situation.It is scanned beyond by background thread still existing after setting time
Oplog, it can periodically discharge the bucket route for by the bucket route of unnecessary occupancy, that is, reclaiming and being taken more.
Oplog processing:
Bucket route corresponding to first looking at whether there is, and be divided into two kinds of situations:Bucket route be not present or
The timestamp that person bucket route are present and the timestamp in bucket route and oplog are preserved differs, and directly deletes
Except oplog;Bucket route are present and timestamp is identical with the timestamp that is preserved in oplog, then go corresponding to from node
Inquiry bucket meta whether there is:
If bucket meta are present from node, oplog is deleted;If bucket meta are not present from node,
Whether the timestamp compared in oplog is identical with the timestamp in bucket route, if identical, deletes bucket route
And oplog, if it is not the same, only deleting oplog.
In the preferred embodiment of metadata maintaining method one of the resource of the application, step S11, step S12 is created or deleted
During except resource, in the establishment of host node more new resources or the timestamp of deletion resource, while after one daily record of persistence, also wrap
Include:
Step S13, still existing daily record is scanned beyond after preset time;
Step S14, according to the daily record scanned, routing iinformation remaining during establishment and the deletion resource is deleted, so as to
Ensure that main and subordinate node resource is finally consistent.Here, all daily records (Oplog) only have recorded routing iinformation when creating and deleting,
What is only recorded is the increment content in all routing iinformations, and only scanning daily record can improve sweep speed here, be quickly found out
Abnormal routing iinformation.
As shown in figure 4, in the preferred embodiment of metadata maintaining method one of the resource of the application, step S14, according to sweeping
The daily record retouched, routing iinformation remaining during establishment and the deletion resource is deleted, including:
Step S141, host node inquiry with the daily record scanned have same asset title routing iinformation whether
In the presence of,
If being not present, step S142, then the daily record is deleted.Here, when bucket route are not present, it is not necessary that go from
Node checks, and directly deletes oplog cans.
In the preferred embodiment of metadata maintaining method one of the resource of the application, step S141, phase is inquired about in host node
With resource name routing iinformation whether there is after, in addition to:
If in the presence of, step S143, judge the timestamp of the daily record and the establishment of the same asset title inquired or delete
Except whether the timestamp of resource is identical,
If differing, step S144, then the daily record is deleted.Here, timestamp and bucket due to oplog preservations
Current time stamp in route differs, then the oplog of this different time stamp is just not necessarily to remain, because can deposit
Current time stamp identical oplog in a bucket route, the only oplog of identical time stamp could be used to check
The bucket route of timestamp when deleting corresponding phase.
As shown in figure 4, in the preferred embodiment of metadata maintaining method one of the resource of the application, step S143, judge
After whether the establishment of the timestamp of the daily record and the same asset title inquired or the timestamp of deletion resource are identical, also
Including:
If identical, step S145, the Resource Properties in the corresponding inquiry from node with the presence or absence of same asset title,
If in the presence of step S146, then deleting the daily record.Here, if bucket meta are present from node, illustrate pair
The bucket route answered are not abnormal bucket route, and corresponding oplog is not necessarily to retain again, it should which deleting should
oplog。
As shown in figure 4, in the preferred embodiment of metadata maintaining method one of the resource of the application, corresponding from node
After upper inquiry is with the presence or absence of the Resource Properties of same asset title, in addition to:
If being not present, step S147, the timestamp of the daily record and the wound of the same asset title inquired are judged again
Whether the timestamp for building or deleting resource is identical;
If identical, step S148, then the daily record and routing iinformation are deleted.Here, as it is possible that twice compare between,
The situation that bucket route timestamp is changed, so needing exist for judging again the timestamp of the daily record with inquiring
Same asset title establishment or delete resource timestamp it is whether identical, to ensure accurate to delete daily record and routing iinformation.
When the corresponding Resource Properties that same asset title is not present from node, judge the timestamp of the daily record with inquiring again
Same asset title establishment or delete resource timestamp it is identical, it is abnormal bucket to illustrate bucket route
Route, bucket route and oplog are deleted simultaneously.
As shown in figure 4, in the preferred embodiment of metadata maintaining method one of the resource of the application, step S147, again
Judge the timestamp of the daily record and the establishment of the same asset title inquired or delete resource timestamp it is whether identical it
Afterwards, in addition to:
If differing, step S149, then the daily record is deleted.Here, timestamp and bucket due to oplog preservations
Timestamp in route differs, then the oplog of this different time stamp is just not necessarily to remain, because can have one
Timestamp identical oplog in bar bucket route, the only oplog of identical time stamp, which could be used to check to delete, to be corresponded to
The bucket route of timestamp during phase, only timestamp is identical, and just can guarantee that to delete by mistake.
In the preferred embodiment of metadata maintaining method one of the resource of the application, in step S1, from node to resource
Attribute safeguarded, in addition to:
After in the establishment from node or deletion Resource Properties success, it will create or delete the establishment of resource or delete money
The timestamp in source is saved in from node in the Resource Properties;
When the request for the attribute for receiving establishment or deletion to same resource again from node, the money of current request is judged
Whether the establishment in source or the timestamp of deletion resource are more than the timestamp in the Resource Properties preserved from node,
If so, the request is being handled from node;
If it is not, ignoring the request from node.Here, the present embodiment is the concurrently place for creating and deleting bucket
Reason requires that creating or delete the request of resource can go to do from node with the corresponding timestamp for creating or deleting at that time resource
Operation, is compared, the timestamp only asked is more than with this timestamp and from the timestamp being stored in attribute on node
During the timestamp preserved from node, this request can be just handled, otherwise ignores the request.After the completion of request processing, processing
The update of time stamp of complete request is saved in from the Resource Properties of node.Pass through the bucket route's that are preserved from node
Timestamp information ensures that the order of concurrent request performs, on host node after the timestamp of request that receives is preceding once records
Bucket route timestamp adds after 1 or the higher value of current time stamp, larger to receive the timestamp of request after guarantee,
For example, the timestamp of the request first received is 10:00, then the timestamp of the request received afterwards is 10:01, or after receive
The timestamp of request is than 10:00 bigger value, in addition, the request execution sequence of host node is held by the request order received
OK, for example, host node is 10:00 receives a request for creating bucket route, and host node corresponds to bucket route's
Timestamp is 10:00, host node is 10:01 receives a request for deleting the bucket, and host node correspondingly updates bucket
Route timestamp is 10:01, if first have received 10 from node:01 delete the bucket route meta request, then by
In the timestamp 10 for deleting request to create:01 is more than the bucket route preserved from node timestamp, then performs deletion
Meta is operated, and due to not finding corresponding meta, return is deleted successfully, and the resource bucket of preservation is being updated from point
Route timestamp is 10:01, afterwards, from node again have received establishment this 10:00bucket route meta request,
Due to creating the timestamp 10 of removal request:00 is less than the corresponding bucket route that preservation is updated from node timestamp
10:01, if creating meta again after meta is deleted can malfunction, so by from node by judging the size of timestamp,
Whether the request to determine to create or delete meta is performed, and ignores the timestamp for being less than the bucket route that renewal preserves
10:01 request, the rule of judgement are, if the timestamp of the request received from node is more than the bucket preserved from node
During route timestamp, the request is performed, if the timestamp of the request received from node is less than what is preserved from node
During bucket route timestamp, then the request is not performed.
In addition, during read-write Resource Properties (bucket meta), renewal and reading bucket meta only need to update or read
Take it is corresponding from node, if can be sent directly to be dealt into host node by mistake from the read-write requests of node, host node from
Obtain that bucket belongs in bucket route tables from node, then directly by read-write requests be forwarded to corresponding to enter from node
Row processing.
According to the another side of the application, a kind of metadata maintained equipment of resource is also provided, the equipment includes:
Attending device 100, the routing iinformation for resource are safeguarded that Resource Properties are in the Resource Properties in host node
Positional information corresponding to from node safeguard that the routing iinformation of the resource includes the position of resource name and Resource Properties
Information, the metadata of the resource include the routing iinformation and attribute of resource.Specifically, from node divided by geographical position
Region/region (region), the node of each region are referred to as from node, and host node (common node) is the public section of all regions
Point, for preserving the region belonging to resource, i.e., where resource from node, routing iinformation is used to record the region belonging to resource,
For including resource name from node, the routing iinformation (bucket route) of the resource corresponding to host node inquiry
(bucket) and where Resource Properties (meta) from node.Reading and writing Resource Properties (bucket meta) only needs to access from section
Point, creating and delete the request of resource needs to access host node simultaneously and from node.Here, pass through the metadata cutting resource
For main and subordinate node, the routing iinformation of resource is recorded and safeguarded in host node, realize that resource name is globally unique, from section
Point is safeguarded to Resource Properties, realizes the metadata High Availabitity of resource, and the application is suitable for use with cluster and provides storage service
Distributed memory system in, realize in resource under more regions, should ensure resource name it is globally unique, ensure resource again
Metadata High Availabitity.
In the preferred embodiment of metadata maintained equipment one of the resource of the application, the routing iinformation of the resource also includes
The timestamp of resource is created or deleted, is easy to, subsequently according to the routing iinformation of timestamp suppressing exception, be further ensured that resource is ordered
Name it is globally unique.
In the preferred embodiment of metadata maintained equipment one of the resource of the application, the attending device 100, including:
Create attending device 1, in establishing resource, host node more new resources establishment or delete time of resource
Stamp, while one daily record of persistence, the daily record include the routing iinformation identical resource name and timestamp with the resource;
Attending device 2 is deleted, for when deleting resource, in the establishment of host node more new resources or the time of deletion resource
Stamp, while one daily record of persistence, the daily record include the routing iinformation identical resource name and timestamp with the resource.
Here, to creating each time and deletion action, all the same of the timestamp (mtime) that creates or delete resource can be updated in host node
When, the Operation Log (oplog) of the corresponding identical time stamp of persistence one, for subsequently deleting remaining master according to daily record inspection
The remaining routing iinformation generated under abnormal scene on node, during one daily record of persistence each time, the time in daily record
The timestamp for stabbing the daily record with being updated when this establishment or deletion resource is consistent.For example, as shown in figure 1, routing iinformation
Form may be configured as (bucket, region, mtime), the form of corresponding daily record may be configured as (bucket, region,
mtime)。
Establishing resource is divided into three steps, and the request of establishing resource will be sent on host node:
The first step:
In order to ensure that resource name is globally unique, the routing iinformation for the resource that inquiry request creates whether there is, according to knot
Fruit is divided into three kinds of situations:The first situation, routing iinformation (bucket route) is present, but region/region in routing iinformation
(region) and this request region/region (region) it is different, or in routing iinformation user (user) and this ask
User (user) it is different;Second of situation, bucket route are present, and region in bucket route and this
The region of request is identical, and the user recorded in existing bucket route and this user asked are same
User;The third situation, bucket route are not present.For the first situation, failure is directly returned to, for second of feelings
Condition, it is newest to update the timestamp in bucket route information, for the third situation, increases a bucket route letter newly
Breath.Timestamp that renewal and needing during newly-increased bucket route preserves in persistence one oplog, oplog simultaneously and this
Timestamp is identical in renewal or newly-increased bucket route.In addition, newly-increased or renewal bucket route and persistence oplog
Need in same affairs, so as to ensure atomicity that is newly-increased or updating bucket route and the oplog of persistence simultaneously,
Either i.e. newly-increased or renewal and persistence are all successful, or it is all unsuccessful.
Second step:
For second and the third situation, it is necessary to initiate establishment operation requests from node to corresponding.
3rd step:
For second and the third situation, if corresponding returned from node fails, user's failure is returned to.It is if corresponding
Returned successfully from node, return to user's success, then compare in bucket route persistence in timestamp and the first step
Whether the timestamp inside oplog is identical, if identical, deletes oplog.
In the preferred embodiment of metadata maintained equipment one of the resource of the application, the establishment attending device 1, for asking
When seeking the routing iinformation of establishing resource, the routing iinformation that the resource is inquired about in host node whether there is,
If being not present, the routing iinformation of the resource, and one daily record of persistence simultaneously are created in host node;
The Resource Properties are being created from node according to the positional information of the resource name and the resource, if the money
Source attribute creates failure, returns to asset creation failure;If creating successfully, asset creation success is returned to, and will create or delete money
The timestamp in source is compared with the timestamp in the daily record of same asset title, if identical, deletes this daily record.Here,
The present embodiment is the third situation for above-mentioned establishing resource, and bucket route are not present, then increases a bucket newly
Route information.If the timestamp for creating or deleting resource is identical with the timestamp in the daily record of same asset title, illustrate principal and subordinate
Node creates success, and the bucket route are not abnormal bucket route, and its corresponding oplog need not be protected again
Stay, then its corresponding oplog should be deleted.In the present embodiment, because resource is not present, in the establishment of host node more new resources
Or the timestamp of deletion resource is the timestamp in host node creates road information, is a kind of special update of time stamp.
In the preferred embodiment of metadata maintained equipment one of the resource of the application, attending device 1 is created, is additionally operable to ask
During the routing iinformation of establishing resource, after the routing iinformation of the host node inquiry resource whether there is,
If in the presence of judging the positional informations of the Resource Properties in the routing iinformation of the resource, if create money with request
The positional information of source attribute is different,
If it is different, return to asset creation failure.Here, the present embodiment is the first situation for upper establishing resource, road
Existed by information (bucket route), but region/region (region) and region/region of this request in routing iinformation
(region) different, such case illustrates that bucket route have been present, if in existing bucket route
Region is Beijing, and the region this time asked is Shanghai, then illustrates that bucket route are occupied, it is impossible to be re-used as
The bucket route in Shanghai, and it is probably to have been created successfully from node via Beijing that this, which has had bucket route,
The bucket route being used, it is also possible to be not create success from node by Beijing, not in the bucket used
Route, it is follow-up to need after being deleted, the bucket route used could be created from node for other.
In the preferred embodiment of metadata maintained equipment one of the resource of the application, the routing iinformation of the resource also includes
User.Here, the routing iinformation of the resource also includes the user (user) belonging to resource, that is, it is by which to represent the resource
User asks what is created, is easy to whether follow-up checks request to create is initiated by same user, is further ensured that the overall situation of resource only
One property.Here, the form of routing iinformation may be configured as (bucket, region, mtime, user).
In the preferred embodiment of metadata maintained equipment one of the resource of the application, attending device 1 is created, is additionally operable to judge
The positional information of Resource Properties in the routing iinformation of the resource, if different from asking the positional information of establishing resource attribute
Afterwards, it is if identical, judge whether the request is initiated by same user,
If so, then update the establishment of the resource in host node or delete the timestamp of resource, and persistence one simultaneously
Daily record;
The Resource Properties are being created from node according to the positional information of the resource name and the resource, if the money
Source attribute creates failure, returns to asset creation failure;If creating successfully, asset creation success is returned to, and will create or delete money
The timestamp in source is compared with the timestamp in the daily record of same asset title, if identical, deletes this daily record.Specifically
, the present embodiment is second of situation being directed in above-mentioned establishing resource, and bucket route are present, and bucket route
In region it is identical with the region that this is asked, and the user recorded in existing bucket route and this
The user of request is same user, then carries out the processing that same user to same resource repeat establishment;In addition, if it is
Different user, then it is identical with the processing method of the first above-mentioned situation, directly return and create failure.
Identical with bucket is created, deleting bucket requests needs to be sent on host node, substantially including following three step:
The first step:
Host node judges that bucket route whether there is, if bucket route are present, renewal bucket route
Timestamp be the newest time, while one oplog of persistence and is created identical during bucket oplog forms;
Second step:
To the corresponding request that deletion bucket meta are initiated from node;
3rd step:
Host node is received after the result of node, if request failure, returns to user's failure;If asked successfully,
User's success is returned, then deletes bucket route and the oplog of first step persistence.
In the preferred embodiment of metadata maintained equipment one of the resource of the application, the deletion attending device 2, for asking
When seeking the routing iinformation for deleting resource, the routing iinformation that the resource is inquired about in host node whether there is,
If in the presence of updating the establishment of the resource in host node or delete the timestamp of resource, and persistence one simultaneously
Daily record;
According to the routing iinformation of resource from Resource Properties described in knot removal, if the Resource Properties delete failure, return
Return resource and delete failure;If deleting successfully, return resource is deleted successfully, and will create or delete the timestamp of resource and identical money
Timestamp in the daily record of source name is compared, if identical, deletes this daily record.Here, after resource is deleted successfully, due to
Bucket meta have deleted success, and corresponding bucket route and oplog are not used, so being deleted, prevent
After only bucket meta are deleted, corresponding bucket route are held over by unnecessary.In addition, in order to judge bucket
Whether route is updated, if without updated, the timestamp and the daily record of same asset title of establishment or deletion resource
In timestamp it is identical, delete bucket route and oplog, if bucket route have been updated over, create or delete money
The timestamp in source differs with the timestamp in the daily record of same asset title, then only deletes oplog.
Oplog is recorded, is bucket route remaining when creating and delete bucket for deleting, e.g. for wound
Bucket route successes are built, but meta corresponding to establishment does not have successful situation, either, deletes meta successes, but delete
Corresponding bucket route do not have successful situation.It is scanned beyond by background thread still existing after setting time
Oplog, it can periodically discharge the bucket route for by the bucket route of unnecessary occupancy, that is, reclaiming and being taken more.
Oplog processing:
Bucket route corresponding to first looking at whether there is, and be divided into two kinds of situations:Bucket route be not present or
The timestamp that person bucket route are present and the timestamp in bucket route and oplog are preserved differs, and directly deletes
Except oplog;Bucket route are present and timestamp is identical with the timestamp that is preserved in oplog, then go corresponding to from node
Inquiry bucket meta whether there is:
If bucket meta are present from node, oplog is deleted;If bucket meta are not present from node,
Whether the timestamp compared in oplog is identical with the timestamp in bucket route, if identical, deletes bucket route
And oplog, if it is not the same, only deleting oplog.
As indicated, in the preferred embodiment of metadata maintained equipment one of the resource of the application, in addition to the scanning dress
3 are put, when being additionally operable to create or deleting resource, in the establishment of host node more new resources or the timestamp of deletion resource, while persistently
After changing a daily record,
Still existing daily record is scanned beyond after preset time;
According to the daily record scanned, routing iinformation remaining during establishment and the deletion resource is deleted.Here, all daily records
(Oplog) it only have recorded routing iinformation when creating and deleting, i.e., what is only recorded is the increment content in all routing iinformations, this
In only scanning a daily record can improve sweep speed, be quickly found out abnormal routing iinformation.
In the preferred embodiment of metadata maintained equipment one of the resource of the application, the scanning means 3, in main section
The routing iinformation that point inquiry has same asset title with the daily record scanned whether there is,
If being not present, the daily record is deleted.Here, when bucket route are not present, it is not necessary that go to examine from node
Look into, directly delete oplog cans.
In the preferred embodiment of metadata maintained equipment one of the resource of the application, the scanning means 3, it is additionally operable in master
After the routing iinformation of querying node same asset title whether there is,
If in the presence of, judge the timestamp of the daily record and the establishment of the same asset title inquired or delete resource when
Between stab it is whether identical,
If differing, the daily record is deleted.Here, due to the timestamp that oplog is preserved and working as in bucket route
Preceding timestamp differs, then the oplog of this different time stamp is just not necessarily to remain, because can have a bucket
When current time stamp identical oplog in route, the only oplog of identical time stamp could be used to check that deletion corresponds to phase
The bucket route of timestamp.
In the preferred embodiment of metadata maintained equipment one of the resource of the application, the scanning means 3, it is additionally operable to judge
After whether the establishment of the timestamp of the daily record and the same asset title inquired or the timestamp of deletion resource are identical,
If identical, the Resource Properties in the corresponding inquiry from node with the presence or absence of same asset title,
If in the presence of deleting the daily record.If here, bucket meta presence, bucket corresponding to explanation from node
Route is not abnormal bucket route, and corresponding oplog is not necessarily to retain again, it should deletes the oplog.
In the preferred embodiment of metadata maintained equipment one of the resource of the application, the scanning means 3, it is additionally operable to right
That answers inquires about after the Resource Properties with the presence or absence of same asset title from node,
If being not present, judge that the timestamp of the daily record provides with the establishment of the same asset title inquired or deletion again
Whether the timestamp in source is identical;
If identical, the daily record and routing iinformation are deleted.Here, as it is possible that twice compare between, bucket
The situation that route timestamp is changed, so needing exist for judging again that the timestamp of the daily record is identical with what is inquired
Whether the establishment of resource name or the timestamp of deletion resource are identical, to ensure accurate deletion daily record and routing iinformation.When corresponding
From node be not present same asset title Resource Properties, judge that the timestamp of the daily record is identical with what is inquired again
The establishment of resource name or the timestamp of deletion resource are identical, and it is abnormal bucket route to illustrate bucket route, will
Bucket route and oplog are deleted simultaneously.
In the preferred embodiment of metadata maintained equipment one of the resource of the application, the scanning means 3, it is additionally operable to again
Judge the timestamp of the daily record and the establishment of the same asset title inquired or delete resource timestamp it is whether identical it
Afterwards,
If differing, the daily record is deleted.Here, in the timestamp and the bucket route that are preserved due to oplog when
Between stab and differ, then the oplog of this different time stamp is just not necessarily to remain, because can have a bucket
Timestamp identical oplog in route, the only oplog of identical time stamp, which could be used to check, deletes time when corresponding to phase
The bucket route of stamp, only timestamp is identical, and just can guarantee that to delete by mistake.
In the preferred embodiment of metadata maintained equipment one of the resource of the application, the attending device 100, it is additionally operable to work as
After the establishment of node or deleting Resource Properties success, the establishment of resource will be being created or deleted or delete the timestamp of resource
It is saved in from node in the Resource Properties;
When the request for the attribute for receiving establishment or deletion to same resource again from node, the money of current request is judged
Whether the establishment in source or the timestamp of deletion resource are more than the timestamp in the Resource Properties preserved from node,
If so, the request is being handled from node;
If it is not, ignoring the request from node.Here, the present embodiment is the concurrently place for creating and deleting bucket
Reason requires that creating or delete the request of resource can go to do from node with the corresponding timestamp for creating or deleting at that time resource
Operation, is compared, the timestamp only asked is more than with this timestamp and from the timestamp being stored in attribute on node
During the timestamp preserved from node, this request can be just handled, otherwise ignores the request.After the completion of request processing, processing
The update of time stamp of complete request is saved in from the Resource Properties of node.Pass through the bucket route's that are preserved from node
Timestamp information ensures that the order of concurrent request performs, on host node after the timestamp of request that receives is preceding once records
Bucket route timestamp adds after 1 or the higher value of current time stamp, larger to receive the timestamp of request after guarantee,
For example, the timestamp of the request first received is 10:00, then the timestamp of the request received afterwards is 10:01, or after receive
The timestamp of request is than 10:00 bigger value, in addition, the request execution sequence of host node is held by the request order received
OK, for example, host node is 10:00 receives a request for creating bucket route, and host node corresponds to bucket route's
Timestamp is 10:00, host node is 10:01 receives a request for deleting the bucket, and host node correspondingly updates bucket
Route timestamp is 10:01, if first have received 10 from node:01 delete the bucket route meta request, then by
In the timestamp 10 for deleting request to create:01 is more than the bucket route preserved from node timestamp, then performs deletion
Meta is operated, and due to not finding corresponding meta, return is deleted successfully, and the resource bucket of preservation is being updated from point
Route timestamp is 10:01, afterwards, from node again have received establishment this 10:00bucket route meta request,
Due to creating the timestamp 10 of removal request:00 is less than the corresponding bucket route that preservation is updated from node timestamp
10:01, if creating meta again after meta is deleted can malfunction, so by from node by judging the size of timestamp,
Whether the request to determine to create or delete meta is performed, and ignores the timestamp for being less than the bucket route that renewal preserves
10:01 request, the rule of judgement are, if the timestamp of the request received from node is more than the bucket preserved from node
During route timestamp, the request is performed, if the timestamp of the request received from node is less than what is preserved from node
During bucket route timestamp, then the request is not performed.
In addition, during read-write Resource Properties (bucket meta), renewal and reading bucket meta only need to update or read
Take it is corresponding from node, if can be sent directly to be dealt into host node by mistake from the read-write requests of node, host node from
Obtain that bucket belongs in bucket route tables from node, then directly by read-write requests be forwarded to corresponding to enter from node
Row processing.
Resource described in one specific application example of the application is a file, and the metadata of the file includes the text
The routing iinformation and folder attribute of part folder, the folder attribute include most quantity of documents of file, the wound of file
Build time, the rights management rule etc. of file.Specifically, there is provided a kind of metadata maintaining method of file, the text
The metadata of part folder includes the routing iinformation and folder attribute of file, and this method includes:
Host node obtains the request of the routing iinformation of establishment file folder, inquire about the routing iinformation of file host node whether
In the presence of the routing iinformation of the file includes globally unique Folder Name, the positional information of folder attribute and establishment
Or the timestamp of Delete Folder;
If being not present, host node creates the routing iinformation of the file, and after one daily record of persistence simultaneously, according to institute
The positional information of Folder Name and the file is stated to initiating to create the request of the folder attribute, the day from node
Will includes the routing iinformation identical Folder Name and timestamp with the file;
The folder attribute is created from node according to the request of the establishment folder attribute received, if the text
Part folder attribute creates failure, and returning to file to host node creates failure.
Further, in the above method, institute is created from node according to the request of the establishment folder attribute received
After stating folder attribute, in addition to:
If creating successfully, returning to file to host node creates successfully feedback;
Host node creates successfully feedback according to the file, by the establishment in the routing iinformation of the file
Or the timestamp of Delete Folder, compared with the timestamp in the daily record of same file folder title, if identical, deleting should
Bar daily record.
Further, in the above method, the routing iinformation that host node inquires about the file whether there is it in host node
Afterwards, in addition to:
If in the presence of the host node judges the positional information of the folder attribute in the routing iinformation of the file, is
The positional information of the no folder attribute created from request is different,
If it is different, the host node returns to file establishment failure to described from node.
Further, in the above method, the routing iinformation of the file also includes user,
Host node judges the positional information of the folder attribute in the routing iinformation of the file, if is created with request
After the positional information difference of folder attribute, in addition to:
If identical, host node judges whether the request of the establishment file folder attribute is initiated by same user,
If so, the then timestamp of the host node renewal establishment or Delete Folder, and after one daily record of persistence simultaneously,
According to the positional information of the Folder Name and the file to the request from node initiation establishment file folder attribute;
The request for pressing from both sides attribute according to the establishment file from node creates the folder attribute, if the folder attribute
Failure is created, returning to file to the host node creates failure.
Further, in the above method, the request for pressing from both sides attribute according to the establishment file from node creates the file
After attribute, in addition to:
If creating successfully, after being created successfully to host node return file, the host node is by the establishment or deletes
Except the timestamp of file is compared with the timestamp in the daily record of same file folder title, if identical, this day is deleted
Will.
Further, in the above method, if identical, after deleting this daily record, including:
The host node is scanned beyond after preset time still existing daily record;
The host node deletes routing iinformation remaining when the establishment and Delete Folder according to the daily record scanned.
Further, in the above method, the host node deletes establishment and the deletion file according to the daily record scanned
Remaining routing iinformation during folder, including:
The routing iinformation that host node is inquired about with the daily record scanned has same file folder title whether there is,
If being not present, host node deletes the daily record.
Further, in the above method, host node inquiry has same file folder title with the daily record scanned
After routing iinformation whether there is, in addition to:
If in the presence of, the host node judge the timestamp of the daily record and the establishment of the same file inquired folder title or
Whether the timestamp of Delete Folder is identical,
If differing, the host node deletes the daily record.
Further, in the above method, the host node judges the timestamp of the daily record and the same file inquired
After whether the establishment of folder title or the timestamp of Delete Folder are identical, in addition to:
If identical, host node whether there is phase to corresponding according to the positional information of folder attribute from node initiation inquiry
With the request of the folder attribute of Folder Name, the file from node according to the inquiry with the presence or absence of same file folder title
The request of folder attribute is inquired about,
If in the presence of described that feedback, the host node root existing for folder attribute are sent from node to the host node
The daily record is deleted according to feedback existing for the folder attribute.
Further, in the above method, the file from node according to the inquiry with the presence or absence of same file folder title
After the request of attribute is inquired about, in addition to:
It is described that the feedback that folder attribute is not present, the host node are sent from node to the host node if being not present
The feedback being not present according to the folder attribute, the timestamp and the same file inquired folder name of the daily record are judged again
Whether the establishment of title or the timestamp of Delete Folder are identical;
If identical, the host node deletes the daily record and routing iinformation.
Further, in the above method, the host node judges that the timestamp of the daily record is identical with what is inquired again
After whether the establishment of Folder Name or the timestamp of Delete Folder are identical, in addition to:
If differing, the host node deletes the daily record.
In another specific application scenarios of the application, a kind of metadata maintaining method of file, the file are also provided
The metadata of folder includes the routing iinformation and folder attribute of file, and this method includes:
Host node obtains the request of the routing iinformation of Delete Folder, according to asking for the routing iinformation of the Delete Folder
The routing iinformation for inquiring about the file is asked to whether there is, the routing iinformation of the file includes globally unique folder name
Title, the positional information of folder attribute and the timestamp of establishment or Delete Folder,
If in the presence of, the timestamp of the host node renewal establishment or Delete Folder, and after one daily record of persistence simultaneously,
To the request that Delete Folder attribute is initiated from node;
It is described that the folder attribute is deleted according to the request of the Delete Folder attribute received from node, if institute
State folder attribute and delete failure, returning to file to the host node deletes failure.
Further, it is described to be deleted from node according to the request of the Delete Folder attribute received in the above method
After the folder attribute, in addition to:
If deleting successfully, returning to file to the host node deletes successfully, and is created described or Delete Folder
Timestamp, if identical, deletes this daily record compared with the timestamp in the daily record of same file folder title.
Further, in the above method, if identical, after deleting this daily record, including:
The host node is scanned beyond after preset time still existing daily record;
The host node deletes routing iinformation remaining when the establishment and Delete Folder according to the daily record scanned.
Further, in the above method, the host node deletes establishment and the deletion file according to the daily record scanned
Remaining routing iinformation during folder, including:
The routing iinformation that host node is inquired about with the daily record scanned has same file folder title whether there is,
If being not present, host node deletes the daily record.
Further, in the above method, host node inquiry has same file folder title with the daily record scanned
After routing iinformation whether there is, in addition to:
If in the presence of, the host node judge the timestamp of the daily record and the establishment of the same file inquired folder title or
Whether the timestamp of Delete Folder is identical,
If differing, the host node deletes the daily record.
Further, in the above method, the host node judges the timestamp of the daily record and the same file inquired
After whether the establishment of folder title or the timestamp of Delete Folder are identical, in addition to:
If identical, host node whether there is phase to corresponding according to the positional information of folder attribute from node initiation inquiry
With the request of the folder attribute of Folder Name, the file from node according to the inquiry with the presence or absence of same file folder title
The request of folder attribute is inquired about,
If in the presence of described that feedback, the host node root existing for folder attribute are sent from node to the host node
The daily record is deleted according to feedback existing for the folder attribute.
Further, in the above method, the file from node according to the inquiry with the presence or absence of same file folder title
After the request of attribute is inquired about, in addition to:
It is described that the feedback that folder attribute is not present, the host node are sent from node to the host node if being not present
The feedback being not present according to the folder attribute, the timestamp and the same file inquired folder name of the daily record are judged again
Whether the establishment of title or the timestamp of Delete Folder are identical;
If identical, the host node deletes the daily record and routing iinformation.
Further, in the above method, the host node judges that the timestamp of the daily record is identical with what is inquired again
After whether the establishment of Folder Name or the timestamp of Delete Folder are identical, in addition to:
If differing, the host node deletes the daily record.
In another specific application scenarios of the application, a kind of metadata maintained equipment of file is also provided, wherein, it is described
The metadata of file includes the routing iinformation and folder attribute of file, and the equipment includes:
Host node, the request of the routing iinformation for obtaining establishment file folder, inquires about the routing iinformation of file in main section
Point whether there is, and the routing iinformation of the file includes globally unique Folder Name, the positional information of folder attribute
With establishment or the timestamp of Delete Folder;If being not present, the routing iinformation of the file, and persistence one simultaneously are created
After daily record, the establishment folder attribute is initiated to from node according to the positional information of the Folder Name and the file
Request, the daily record includes routing iinformation identical Folder Name and timestamp with the file;
From node, the request of the establishment folder attribute received for basis creates the folder attribute, if
The folder attribute creates failure, and returning to file to host node creates failure.
Preferably, it is described from node in the said equipment, it is additionally operable to according to the establishment folder attribute received
After request creates the folder attribute, if creating successfully, returning to file to host node creates successfully feedback;
The host node, it is additionally operable to create successfully feedback according to the file, by the routing iinformation of the file
In the establishment or Delete Folder timestamp and same file folder title daily record in timestamp compared with, if phase
Together, then this daily record is deleted.
Preferably, in the said equipment, the host node, it is additionally operable to inquiring about the routing iinformation of the file in host node
With the presence or absence of afterwards, if in the presence of the host node judges the position letter of the folder attribute in the routing iinformation of the file
Breath, if it is different from the positional information for the folder attribute that request creates, if it is different, returning to file establishment from node to described
Failure.
Preferably, in the said equipment, the routing iinformation of the file also includes user,
The host node, the positional information for the folder attribute for being additionally operable to judge in the routing iinformation of the file, it is
After the no positional information difference with asking establishment file folder attribute, if identical, the request of the establishment file folder attribute is judged
Whether initiated by same user, if so, the timestamp of the establishment or Delete Folder is then updated, and one day of persistence simultaneously
After will, asking for establishment file folder attribute is initiated to from node according to the positional information of the Folder Name and the file
Ask;
It is described from node, the request for being additionally operable to press from both sides attribute according to the establishment file creates the folder attribute, if institute
State folder attribute and create failure, returning to file to the host node creates failure.
Preferably, it is described from node in the said equipment, it is additionally operable to create in the request for pressing from both sides attribute according to the establishment file
After the folder attribute, if creating successfully, after being created successfully to host node return file,
The host node, it is additionally operable to the daily record by the timestamp of the establishment or Delete Folder and same file folder title
In timestamp be compared, if identical, delete this daily record.
Preferably, in the said equipment, if the host node is additionally operable to identical, after deleting this daily record, scanning is super
Cross still existing daily record after preset time;According to the daily record scanned, remnants when deleting the establishment and Delete Folder
Routing iinformation.
Preferably, in the said equipment, the host node, being additionally operable to inquiry and the daily record scanned has same file
The routing iinformation of folder title whether there is, if being not present, host node deletes the daily record.
Preferably, in the said equipment, the host node, it is additionally operable to that there is phase identical text with the daily record scanned in inquiry
After the routing iinformation of part folder title whether there is, the timestamp and the same file inquired folder title of the daily record are judged
Create or whether the timestamp of Delete Folder is identical, if differing, delete the daily record.
Preferably, in the said equipment, the host node, it is additionally operable to judging the timestamp of the daily record and the phase inquired
With the establishment of Folder Name or the timestamp of Delete Folder it is whether identical after, if identical, according to the position of folder attribute
Confidence is ceased to corresponding initiates request of the inquiry with the presence or absence of the folder attribute of same file folder title from node;
It is described from node, be additionally operable to the request with the presence or absence of the folder attribute of same file folder title according to the inquiry
Inquired about, if in the presence of to feedback existing for host node transmission folder attribute;
The host node, it is additionally operable to the feedback according to existing for the folder attribute and deletes the daily record.
Preferably, it is described to be additionally operable to pressing from both sides name with the presence or absence of same file according to the inquiry from node in the said equipment
After the request of the folder attribute of title is inquired about, if being not present, send what folder attribute was not present to the host node
Feedback;
The host node, be additionally operable to the feedback being not present according to the folder attribute, judge again the daily record when
Between stab and inquire same file folder title establishment or Delete Folder timestamp it is whether identical;If identical, delete
The daily record and routing iinformation.
Preferably, in the said equipment, the host node, it is additionally operable to judging the timestamp of the daily record with inquiring again
Same file folder title establishment or Delete Folder timestamp it is whether identical after, if differing, delete the daily record.
In another specific application scenarios of the application, a kind of metadata maintained equipment of file, the file are also provided
The metadata of folder includes the routing iinformation and folder attribute of file, and the equipment includes:
Host node, the request of the routing iinformation for obtaining Delete Folder, believed according to the route of the Delete Folder
The routing iinformation of file whether there is described in the requesting query of breath, and the routing iinformation of the file includes globally unique text
Part folder title, the positional information of folder attribute and the timestamp of establishment or Delete Folder, if in the presence of, update the establishment or
The timestamp of Delete Folder, and after one daily record of persistence simultaneously, to the request that Delete Folder attribute is initiated from node;
The file category is deleted in the request of the Delete Folder attribute from node, received for basis
Property, if the folder attribute deletes failure, return to file to the host node and delete failure.
Preferably, it is described from node in the said equipment, it is additionally operable to according to the Delete Folder attribute received
After the folder attribute is deleted in request, if deleting successfully, returning to file to the host node deletes successfully, and by described in
Create or the timestamp of Delete Folder is compared with the timestamp in the daily record of same file folder title, if identical, delete
Except this daily record.
Preferably, in the said equipment, the host node, if being additionally operable to identical, after deleting this daily record, scanning is super
Cross still existing daily record after preset time;According to the daily record scanned, remnants when deleting the establishment and Delete Folder
Routing iinformation.
Preferably, in the said equipment, the host node, be additionally operable to according to the daily record scanned, delete the establishment and
Remaining routing iinformation during Delete Folder, inquiry have the routing iinformation of same file folder title with the daily record scanned
It whether there is, if being not present, delete the daily record.
Preferably, in the said equipment, host node, it is additionally operable to that there is same file folder with the daily record scanned in inquiry
After the routing iinformation of title whether there is, if in the presence of the host node judges the timestamp of the daily record and the phase inquired
It is whether identical with the establishment of Folder Name or the timestamp of Delete Folder, if differing, delete the daily record.
Preferably, in the said equipment, the host node, it is additionally operable to judging the timestamp of the daily record and the phase inquired
With the establishment of Folder Name or the timestamp of Delete Folder it is whether identical after, if identical, according to the position of folder attribute
Confidence is ceased to corresponding initiates request of the inquiry with the presence or absence of the folder attribute of same file folder title from node;
It is described from node, be additionally operable to the request with the presence or absence of the folder attribute of same file folder title according to the inquiry
Inquired about, if in the presence of described that feedback existing for folder attribute is sent from node to the host node;
The host node, it is additionally operable to the feedback according to existing for the folder attribute and deletes the daily record.
Preferably, it is described from node in the said equipment, it is additionally operable to pressing from both sides name with the presence or absence of same file according to the inquiry
After the request of the folder attribute of title is inquired about, if being not present, send what folder attribute was not present to the host node
Feedback;
The host node, be additionally operable to the feedback being not present according to the folder attribute, judge again the daily record when
Between stab and inquire same file folder title establishment or Delete Folder timestamp it is whether identical;If identical, delete
The daily record and routing iinformation.
Preferably, in the said equipment, the host node, it is additionally operable to judging the timestamp of the daily record with inquiring again
Same file folder title establishment or Delete Folder timestamp it is whether identical after, if differing, delete the daily record.
In another specific application scenarios of the application, a kind of metadata storage device of file, the file are also provided
The metadata of folder includes the routing iinformation and folder attribute of file, wherein, described device includes:
Host node, for storing the routing iinformation of the file, the routing iinformation of the file is including globally unique
Folder Name and folder attribute positional information;From node, for storing the folder attribute.
Preferably, in said apparatus, the routing iinformation of the file also includes creating or the timestamp of Delete Folder.
Preferably, in said apparatus, the host node also includes daily record, and the daily record includes the route with the file
Information identical Folder Name and timestamp.
In summary, by being main and subordinate node the metadata cutting of resource, the routing iinformation of resource is entered in host node
Row record and maintenance, realize that resource name is globally unique, Resource Properties are being safeguarded from node, are realizing the metadata of resource
High Availabitity, the application are suitable for use with the distributed memory system that cluster provides storage service, realized in resource in more regions
Under, it should ensure that resource name is globally unique, ensure the metadata High Availabitity of resource again.In addition, by creating or deleting money
During source, host node more new resources establishment or delete the timestamp (mtime) of resource, while one daily record of persistence is described
Daily record includes the routing iinformation identical resource name and timestamp with the resource, can delete remnants' according to daily record inspection
The remaining routing iinformation generated under abnormal scene on host node.
Obviously, those skilled in the art can carry out the essence of various changes and modification without departing from the application to the application
God and scope.So, if these modifications and variations of the application belong to the scope of the application claim and its equivalent technologies
Within, then the application is also intended to comprising including these changes and modification.
It should be noted that the application can be carried out in the assembly of software and/or software and hardware, for example, can adopt
With application specific integrated circuit (ASIC), general purpose computer or any other realized similar to hardware device.In one embodiment
In, the software program of the application can realize steps described above or function by computing device.Similarly, the application
Software program (including related data structure) can be stored in computer readable recording medium storing program for performing, for example, RAM memory,
Magnetically or optically driver or floppy disc and similar devices.In addition, some steps or function of the application can employ hardware to realize, example
Such as, coordinate as with processor so as to perform the circuit of each step or function.
In addition, the part of the application can be applied to computer program product, such as computer program instructions, when its quilt
When computer performs, by the operation of the computer, it can call or provide according to the present processes and/or technical scheme.
And the programmed instruction of the present processes is called, it is possibly stored in fixed or moveable recording medium, and/or pass through
Broadcast or the data flow in other signal bearing medias and be transmitted, and/or be stored according to described program instruction operation
In the working storage of computer equipment.Here, including a device according to one embodiment of the application, the device includes using
Memory in storage computer program instructions and processor for execute program instructions, wherein, when the computer program refers to
When order is by the computing device, method and/or skill of the plant running based on foregoing multiple embodiments according to the application are triggered
Art scheme.
It is obvious to a person skilled in the art that the application is not limited to the details of above-mentioned one exemplary embodiment, Er Qie
In the case of without departing substantially from spirit herein or essential characteristic, the application can be realized in other specific forms.Therefore, no matter
From the point of view of which point, embodiment all should be regarded as exemplary, and be nonrestrictive, scope of the present application is by appended power
Profit requires rather than described above limits, it is intended that all in the implication and scope of the equivalency of claim by falling
Change is included in the application.Any reference in claim should not be considered as to the involved claim of limitation.This
Outside, it is clear that the word of " comprising " one is not excluded for other units or step, and odd number is not excluded for plural number.That is stated in device claim is multiple
Unit or device can also be realized by a unit or device by software or hardware.The first, the second grade word is used for table
Show title, and be not offered as any specific order.
Claims (69)
1. a kind of metadata maintaining method of resource, wherein, the metadata of the resource includes the routing iinformation and resource of resource
Attribute, this method include:
The routing iinformation of resource safeguarded in host node, the routing iinformation of the resource include globally unique resource name and
The positional information of Resource Properties;
Safeguarded corresponding to positional information of the Resource Properties in the Resource Properties from node.
2. according to the method for claim 1, wherein, the routing iinformation of the resource also include creating or delete resource when
Between stab;
The routing iinformation of resource is safeguarded in host node, from section corresponding to positional information of the Resource Properties in the Resource Properties
Put and safeguarded, including:
According to the establishment or the timestamp of deletion resource, the remaining route letter when host node is deleted and creates and delete resource
Cease, safeguarded corresponding to positional information of the Resource Properties in the Resource Properties from node.
3. according to the method for claim 2, wherein, according to the establishment or the timestamp of deletion resource, deleted in host node
Except routing iinformation remaining when creating and delete resource, from node corresponding to positional information of the Resource Properties in the Resource Properties
Safeguarded, including:
When creating or deleting resource, the timestamp of establishment or the deletion resource, while one day of persistence are updated in host node
Will, the daily record include the routing iinformation identical resource name and timestamp with the resource, and Resource Properties are in the resource
Safeguarded corresponding to the positional information of attribute from node;
It is remaining when host node deletes establishment and the deletion resource according to the timestamp and the daily record for creating or deleting resource
Routing iinformation.
4. according to the method for claim 3, wherein, during establishing resource, in the host node renewal establishment or deletion resource
Timestamp, while one daily record of persistence, carried out from node corresponding to positional information of the Resource Properties in the Resource Properties
Safeguard, including:
When asking the routing iinformation of establishing resource, the routing iinformation that the resource is inquired about in host node whether there is,
If being not present, the routing iinformation of the resource, and one daily record of persistence simultaneously, the road of the resource are created in host node
The resource name, the positional information of the Resource Properties and the timestamp of the establishment or deletion resource are included by information;
The Resource Properties are being created from node according to the positional information of the resource name and the resource, if the resource category
Property create failure, return asset creation failure;If creating successfully, asset creation success is returned to, and will create or delete resource
Timestamp is compared with the timestamp in the daily record of same asset title, if identical, deletes this daily record.
5. the method according to claim 11, wherein, when asking the routing iinformation of establishing resource, described in host node inquiry
After the routing iinformation of resource whether there is, in addition to:
If in the presence of judging the positional informations of the Resource Properties in the routing iinformation of the resource, if the resource created with request
The positional information of attribute is different,
If it is different, return to asset creation failure.
6. according to the method for claim 5, wherein, the routing iinformation of the resource also includes user, judges the resource
Routing iinformation in Resource Properties positional information, if with ask establishing resource attribute positional information difference after, also
Including:
If identical, judge whether the request is initiated by same user,
If so, then update the establishment of the resource in host node or delete the timestamp of resource, and one daily record of persistence simultaneously;
The Resource Properties are being created from node according to the positional information of the resource name and the resource, if the resource category
Property create failure, return asset creation failure;If creating successfully, asset creation success is returned to, and will create or delete resource
Timestamp is compared with the timestamp in the daily record of same asset title, if identical, deletes this daily record.
7. according to the method for claim 3, wherein, when deleting resource, provided in the establishment or deletion of host node more new resources
The timestamp in source, while one daily record of persistence, enter from node corresponding to positional information of the Resource Properties in the Resource Properties
Row maintenance, including:
When the routing iinformation of resource is deleted in request, the routing iinformation that the resource is inquired about in host node whether there is,
If in the presence of, the timestamp of the establishment or deletion resource in the routing iinformation that host node updates the resource, and together
When one daily record of persistence;
According to the routing iinformation of resource from Resource Properties described in knot removal, if the Resource Properties delete failure, money is returned to
Delete failure in source;If deleting successfully, return to resource and delete successfully, and the timestamp and same asset name that will create or delete resource
Timestamp in the daily record of title is compared, if identical, deletes this daily record.
8. according to the method for claim 3, wherein, according to establishment or the timestamp of resource and the daily record are deleted, in master
Routing iinformation remaining during resource is created and deleted described in knot removal, including:
Still existing daily record is scanned beyond after preset time;
According to the daily record scanned, routing iinformation remaining during establishment and the deletion resource is deleted.
9. according to the method for claim 8, wherein, according to daily record scan, when deleting the establishment and deleting resource
Remaining routing iinformation, including:
It whether there is in the routing iinformation that host node inquiry has same asset title with the daily record scanned,
If being not present, the daily record is deleted.
10. according to the method for claim 9, wherein, whether deposited in the routing iinformation of host node inquiry same asset title
Afterwards, in addition to:
If in the presence of judging the timestamp of the daily record and the establishment of the same asset title inquired or delete the timestamp of resource
It is whether identical,
If differing, the daily record is deleted.
11. according to the method for claim 10, wherein, judge the timestamp of the daily record and the same asset name inquired
After whether the establishment of title or the timestamp of deletion resource are identical, in addition to:
If identical, the Resource Properties in the corresponding inquiry from node with the presence or absence of same asset title,
If in the presence of deleting the daily record.
12. according to the method for claim 11, wherein, it whether there is same asset title in the corresponding inquiry from node
Resource Properties after, in addition to:
If being not present, the timestamp of the daily record and the establishment of the same asset title inquired are judged again or deletes resource
Whether timestamp is identical;
If identical, the daily record and routing iinformation are deleted.
13. according to the method for claim 12, wherein, the timestamp money identical with what is inquired of the daily record is judged again
After whether the establishment of source name or the timestamp of deletion resource are identical, in addition to:
If differing, the daily record is deleted.
14. according to the method described in any one of claim 1 to 13, wherein, Resource Properties are being safeguarded from node, also wrapped
Include:
After in the establishment from node or deletion Resource Properties success, it will create or delete the establishment of resource or delete resource
Timestamp is saved in from node in the Resource Properties;
When the request for the attribute for receiving establishment or deletion to same resource again from node, the resource of current request is judged
Whether the timestamp of establishment or deletion resource is more than the timestamp in the Resource Properties preserved from node,
If so, the request is being handled from node;
If it is not, ignoring the request from node.
15. a kind of metadata maintaining method of resource, wherein, the metadata of the resource includes the routing iinformation and resource of resource
Attribute, this method include:
Host node obtains the request of the routing iinformation of establishing resource, and the routing iinformation of query resource whether there is in host node, institute
State resource routing iinformation include globally unique resource name, the positional information of Resource Properties and establishment or delete resource when
Between stab;
If being not present, host node creates the routing iinformation of the resource, and after one daily record of persistence simultaneously, according to the resource
The positional information of title and the resource to initiating to create the request of the Resource Properties from node, the daily record include with it is described
The routing iinformation identical resource name and timestamp of resource;
The Resource Properties are created from node according to the request of the establishment Resource Properties received, if the Resource Properties are created
Build unsuccessfully, asset creation failure is returned to host node.
16. method as claimed in claim 15, wherein, created from node according to the request of the establishment Resource Properties received
Build after the Resource Properties, in addition to:
If creating successfully, returning to asset creation to host node successfully feeds back;
Host node successfully feeds back according to the asset creation, by the establishment in the routing iinformation of the resource or deletes money
The timestamp in source is compared with the timestamp in the daily record of same asset title, if identical, deletes this daily record.
17. method as claimed in claim 15, wherein, whether the routing iinformation that host node inquires about the resource is deposited in host node
Afterwards, in addition to:
If in the presence of the host node judges the positional information of the Resource Properties in the routing iinformation of the resource, if with request
The positional information of the Resource Properties of establishment is different,
If it is different, the host node returns to asset creation failure to described from node.
18. method as claimed in claim 17, wherein, the routing iinformation of the resource also includes user,
Host node judges the positional information of the Resource Properties in the routing iinformation of the resource, if with asking establishing resource attribute
Positional information difference after, in addition to:
If identical, host node judges whether the request of the establishing resource attribute is initiated by same user,
If so, the then timestamp of the host node renewal establishment or deletion resource, and after one daily record of persistence simultaneously, according to institute
The positional information of resource name and the resource is stated to the request that establishing resource attribute is initiated from node;
The Resource Properties are created from node according to the request of the establishing resource attribute, if the Resource Properties create failure,
Asset creation failure is returned to the host node.
19. the method according to claim 11, wherein, from node according to creating the request of the establishing resource attribute
After Resource Properties, in addition to:
If creating successfully, after returning to asset creation success to the host node, the host node is by the establishment or deletes resource
Timestamp compared with the timestamp in the daily record of same asset title, if identical, delete this daily record.
20. the method according to claim 11, wherein, if identical, after deleting this daily record, including:
The host node is scanned beyond after preset time still existing daily record;
The host node deletes routing iinformation remaining during establishment and the deletion resource according to the daily record scanned.
21. according to the method for claim 20, wherein, the host node deletes the establishment according to the daily record scanned
With routing iinformation remaining when deleting resource, including:
The routing iinformation that host node inquiry has same asset title with the daily record scanned whether there is,
If being not present, host node deletes the daily record.
22. according to the method for claim 21, wherein, host node inquiry has same asset with the daily record scanned
After the routing iinformation of title whether there is, in addition to:
If in the presence of the host node judges that the timestamp of the daily record provides with the establishment of the same asset title inquired or deletion
Whether the timestamp in source is identical,
If differing, the host node deletes the daily record.
According to the method for claim 22,23. wherein, the host node judges the timestamp of the daily record and inquired
After whether the establishment of same asset title or the timestamp of deletion resource are identical, in addition to:
If identical, host node whether there is same asset to corresponding according to the positional information of Resource Properties from node initiation inquiry
The request of the Resource Properties of title, enter from node according to the inquiry with the presence or absence of the request of the Resource Properties of same asset title
Row inquiry,
If in the presence of described that feedback existing for Resource Properties is sent from node to the host node, the host node is according to
The existing feedback of Resource Properties deletes the daily record.
24. according to the method for claim 23, wherein, it whether there is same asset title from node according to the inquiry
After the request of Resource Properties is inquired about, in addition to:
If being not present, described that the feedback that Resource Properties are not present is sent from node to the host node, the host node is according to institute
State the feedback that Resource Properties are not present, judge again the timestamp of the daily record and the establishment of the same asset title inquired or
Whether the timestamp for deleting resource is identical;
If identical, the host node deletes the daily record and routing iinformation.
25. according to the method for claim 24, wherein, the host node judges timestamp and the inquiry of the daily record again
After whether the establishment of the same asset title arrived or the timestamp of deletion resource are identical, in addition to:
If differing, the host node deletes the daily record.
26. a kind of metadata maintaining method of resource, wherein, the metadata of the resource includes the routing iinformation and resource of resource
Attribute, this method include:
Host node obtains the request for the routing iinformation for deleting resource, according to the requesting query institute of the routing iinformation of the deletion resource
The routing iinformation for stating resource whether there is, and the routing iinformation of the resource includes globally unique resource name, Resource Properties
Positional information and the timestamp for creating or deleting resource,
If in the presence of, the timestamp of the host node renewal establishment or deletion resource, and after one daily record of persistence simultaneously, Xiang Congjie
Point initiates to delete the request of Resource Properties;
It is described that the Resource Properties are deleted according to the request of the deletion Resource Properties received from node, if the resource category
Property delete failure, to the host node return resource delete failure.
27. according to the method for claim 26, wherein, it is described from node according to the deletion Resource Properties received
After the Resource Properties are deleted in request, in addition to:
If delete successfully, to the host node return resource deletes successfully, and by it is described establishment or delete resource timestamp and
Timestamp in the daily record of same asset title is compared, if identical, deletes this daily record.
28. the method according to claim 11, wherein, if identical, after deleting this daily record, including:
The host node is scanned beyond after preset time still existing daily record;
The host node deletes routing iinformation remaining during establishment and the deletion resource according to the daily record scanned.
29. according to the method for claim 28, wherein, the host node deletes the establishment according to the daily record scanned
With routing iinformation remaining when deleting resource, including:
The routing iinformation that host node inquiry has same asset title with the daily record scanned whether there is,
If being not present, host node deletes the daily record.
30. according to the method for claim 29, wherein, host node inquiry has same asset with the daily record scanned
After the routing iinformation of title whether there is, in addition to:
If in the presence of the host node judges that the timestamp of the daily record provides with the establishment of the same asset title inquired or deletion
Whether the timestamp in source is identical,
If differing, the host node deletes the daily record.
According to the method for claim 30,31. wherein, the host node judges the timestamp of the daily record and inquired
After whether the establishment of same asset title or the timestamp of deletion resource are identical, in addition to:
If identical, host node whether there is same asset to corresponding according to the positional information of Resource Properties from node initiation inquiry
The request of the Resource Properties of title, enter from node according to the inquiry with the presence or absence of the request of the Resource Properties of same asset title
Row inquiry,
If in the presence of described that feedback existing for Resource Properties is sent from node to the host node, the host node is according to
The existing feedback of Resource Properties deletes the daily record.
32. according to the method for claim 31, wherein, it whether there is same asset title from node according to the inquiry
After the request of Resource Properties is inquired about, in addition to:
If being not present, described that the feedback that Resource Properties are not present is sent from node to the host node, the host node is according to institute
State the feedback that Resource Properties are not present, judge again the timestamp of the daily record and the establishment of the same asset title inquired or
Whether the timestamp for deleting resource is identical;
If identical, the host node deletes the daily record and routing iinformation.
33. according to the method for claim 32, wherein, the host node judges timestamp and the inquiry of the daily record again
After whether the establishment of the same asset title arrived or the timestamp of deletion resource are identical, in addition to:
If differing, the host node deletes the daily record.
34. a kind of metadata maintained equipment of resource, wherein, the metadata of the resource includes the routing iinformation and resource of resource
Attribute, the equipment include:
Attending device, for the routing iinformation of resource to be safeguarded in host node, the routing iinformation of the resource includes the overall situation
The positional information of unique resource name and Resource Properties;By corresponding to positional information of the Resource Properties in the Resource Properties from
Node is safeguarded.
35. equipment according to claim 34, wherein, the routing iinformation of the resource also includes creating or deleting resource
Timestamp, the attending device, for the timestamp according to the establishment or deletion resource, deleted in host node and create and delete
Remaining routing iinformation during resource, safeguarded from node corresponding to positional information of the Resource Properties in the Resource Properties.
36. equipment according to claim 35, wherein, the attending device, including:
Create attending device, in establishing resource, host node more new resources establishment or delete the timestamp of resource, together
When one daily record of persistence, the daily record includes routing iinformation identical resource name and timestamp with the resource, resource
Safeguarded corresponding to positional information of the attribute in the Resource Properties from node;
Attending device is deleted, for when deleting resource, in the establishment of host node more new resources or the timestamp of deletion resource, together
When one daily record of persistence, the daily record includes routing iinformation identical resource name and timestamp with the resource, resource
Safeguarded corresponding to positional information of the attribute in the Resource Properties from node;
Scanning means, for according to timestamp and the daily record for creating or deleting resource, host node delete the establishment and
Delete routing iinformation remaining during resource.
37. equipment according to claim 36, wherein, the establishment attending device, for asking the route of establishing resource
During information, the routing iinformation that the resource is inquired about in host node whether there is,
If being not present, the routing iinformation of the resource, and one daily record of persistence simultaneously are created in host node;
The Resource Properties are being created from node according to the positional information of the resource name and the resource, if the resource category
Property create failure, return asset creation failure;If creating successfully, asset creation success is returned to, and will create or delete resource
Timestamp is compared with the timestamp in the daily record of same asset title, if identical, deletes this daily record.
38. equipment according to claim 36, wherein, attending device is created, is additionally operable to ask the route letter of establishing resource
During breath, after the routing iinformation of the host node inquiry resource whether there is,
If in the presence of judging the positional informations of the Resource Properties in the routing iinformation of the resource, if with asking establishing resource category
Property positional information it is different,
If it is different, return to asset creation failure.
39. the equipment according to claim 38, wherein, the routing iinformation of the resource also includes user, described to create dimension
Protection unit, the positional information for the Resource Properties being additionally operable in the routing iinformation for judging the resource, if create money with request
After the positional information difference of source attribute, if identical, judge whether the request is initiated by same user,
If so, then update the establishment of the resource in host node or delete the timestamp of resource, and one daily record of persistence simultaneously;
The Resource Properties are being created from node according to the positional information of the resource name and the resource, if the resource category
Property create failure, return asset creation failure;If creating successfully, asset creation success is returned to, and will create or delete resource
Timestamp is compared with the timestamp in the daily record of same asset title, if identical, deletes this daily record.
40. equipment according to claim 36, wherein, the deletion attending device, for asking the route of deletion resource
During information, the routing iinformation that the resource is inquired about in host node whether there is,
If in the presence of updating the establishment of the resource in host node or delete the timestamp of resource, and one daily record of persistence simultaneously;
According to the routing iinformation of resource from Resource Properties described in knot removal, if the Resource Properties delete failure, money is returned to
Delete failure in source;If deleting successfully, return to resource and delete successfully, and the timestamp and same asset name that will create or delete resource
Timestamp in the daily record of title is compared, if identical, deletes this daily record.
41. equipment according to claim 36, wherein, the scanning means, it is used for
Still existing daily record is scanned beyond after preset time;
According to the daily record scanned, routing iinformation remaining during establishment and the deletion resource is deleted.
42. equipment according to claim 41, wherein, the scanning means, in host node inquiry and the scanning
To the daily record routing iinformation with same asset title whether there is,
If being not present, the daily record is deleted.
43. equipment according to claim 42, wherein, the scanning means, it is additionally operable to inquire about same asset in host node
After the routing iinformation of title whether there is,
If in the presence of judging the timestamp of the daily record and the establishment of the same asset title inquired or delete the timestamp of resource
It is whether identical,
If differing, the daily record is deleted.
44. equipment according to claim 43, wherein, the scanning means, it is additionally operable to judge the timestamp of the daily record
With the establishment of same asset title inquired or delete resource timestamp it is whether identical after,
If identical, the Resource Properties in the corresponding inquiry from node with the presence or absence of same asset title, if in the presence of deleting should
Daily record.
45. equipment according to claim 44, wherein, the scanning means, it is additionally operable to inquire about from node corresponding
After the Resource Properties of same asset title,
If being not present, the timestamp of the daily record and the establishment of the same asset title inquired are judged again or deletes resource
Whether timestamp is identical;
If identical, the daily record and routing iinformation are deleted.
46. equipment according to claim 45, wherein, the scanning means, be additionally operable to judge again the daily record when
Between the establishment of same asset title stabbing and inquire or delete resource timestamp it is whether identical after,
If differing, the daily record is deleted.
47. according to the equipment described in any one of claim 34 to 46, wherein, the attending device, it is additionally operable to when from node
Establishment or delete Resource Properties success after, will create or delete resource establishment or delete resource timestamp be saved in from
On node in the Resource Properties;
When the request for the attribute for receiving establishment or deletion to same resource again from node, the resource of current request is judged
Whether the timestamp of establishment or deletion resource is more than the timestamp in the Resource Properties preserved from node,
If so, the request is being handled from node;
If it is not, ignoring the request from node.
48. a kind of metadata maintained equipment of resource, wherein, the metadata of the resource includes the routing iinformation and resource of resource
Attribute, the equipment include:
Whether host node, the request of the routing iinformation for obtaining establishing resource, the routing iinformation of query resource are deposited in host node
Include globally unique resource name, the positional information of Resource Properties and establishment in the routing iinformation of, the resource or delete money
The timestamp in source;If being not present, the routing iinformation of the resource is created, and after one daily record of persistence simultaneously, according to the money
The positional information of source name and the resource is to the request that the establishment Resource Properties are initiated from node, and the daily record includes and institute
State the routing iinformation identical resource name and timestamp of resource;
From node, for creating the Resource Properties according to the request of the establishment Resource Properties received, if the resource
Attribute creates failure, and asset creation failure is returned to host node.
49. equipment as claimed in claim 48, wherein, it is described from node, it is additionally operable to according to the establishment money received
After the request of source attribute creates the Resource Properties, if creating successfully, returning to asset creation to host node successfully feeds back;
The host node, it is additionally operable to successfully be fed back according to the asset creation, described in the routing iinformation of the resource
The timestamp of resource is created or deleted compared with the timestamp in the daily record of same asset title, if identical, deleting should
Bar daily record.
50. equipment as claimed in claim 49, wherein, the host node, it is additionally operable to inquiring about the routing iinformation of the resource
After host node whether there is, if in the presence of the host node judges the position of the Resource Properties in the routing iinformation of the resource
Confidence ceases, and if it is different from the positional information for the Resource Properties that request creates, if it is different, returning to asset creation from node to described
Failure.
51. equipment as claimed in claim 50, wherein, the routing iinformation of the resource also includes user,
The host node, the positional information for the Resource Properties for being additionally operable to judge in the routing iinformation of the resource, if with request
After the positional information difference of establishing resource attribute, if identical, judge the request of the establishing resource attribute whether by same use
Family is initiated, if so, the timestamp of establishment or the deletion resource is then updated, and after one daily record of persistence simultaneously, according to described
The positional information of resource name and the resource to from node initiate establishing resource attribute request;
It is described from node, be additionally operable to create the Resource Properties according to the request of the establishing resource attribute, if the resource category
Property create failure, to the host node return asset creation failure.
52. equipment according to claim 51, wherein, it is described from node, it is additionally operable to according to the establishing resource attribute
Request create the Resource Properties after, if creates successfully, to host node return asset creation successfully after,
The host node, it is additionally operable to the timestamp of the establishment or deletion resource and the time in the daily record of same asset title
Stamp is compared, if identical, deletes this daily record.
53. equipment according to claim 52, wherein, if the host node is additionally operable to identical, delete this daily record
Afterwards, still existing daily record is scanned beyond after preset time;According to the daily record scanned, establishment and the deletion resource is deleted
When remaining routing iinformation.
54. equipment according to claim 53, wherein, the host node, it is additionally operable to inquiry and the daily record scanned
Routing iinformation with same asset title whether there is, if being not present, host node deletes the daily record.
55. equipment according to claim 54, wherein, the host node, it is additionally operable in inquiry and the day scanned
Will has after the routing iinformation of same asset title whether there is, and judges the timestamp money identical with what is inquired of the daily record
Whether the establishment of source name or the timestamp of deletion resource are identical, if differing, delete the daily record.
56. equipment according to claim 55, wherein, the host node, it is additionally operable to judging the timestamp of the daily record
With the establishment of same asset title inquired or delete resource timestamp it is whether identical after, if identical, according to resource category
Property positional information to it is corresponding from node initiate inquiry with the presence or absence of same asset title Resource Properties request;
The request of the Resource Properties for from node, being additionally operable to whether there is same asset title according to the inquiry is looked into
Ask, if in the presence of to feedback existing for host node transmission Resource Properties;
The host node, it is additionally operable to the feedback according to existing for the Resource Properties and deletes the daily record.
57. equipment according to claim 56, wherein, it is described to be additionally operable to whether there is phase according to the inquiry from node
With the Resource Properties of resource name request inquired about after, if being not present, to the host node send Resource Properties do not deposit
Feedback;
The host node, be additionally operable to the feedback being not present according to the Resource Properties, judge again the timestamp of the daily record with
Whether the establishment of the same asset title inquired or the timestamp of deletion resource are identical;If identical, the daily record and road are deleted
By information.
58. equipment according to claim 57, wherein, the host node, be additionally operable to judge again the daily record when
Between the establishment of same asset title stabbing and inquire or delete resource timestamp it is whether identical after, if differing, delete
Except the daily record.
59. a kind of metadata maintained equipment of resource, wherein, the metadata of the resource includes the routing iinformation and resource of resource
Attribute, the equipment include:
Host node, for obtaining the request for the routing iinformation for deleting resource, according to the request of the routing iinformation of the deletion resource
The routing iinformation for inquiring about the resource whether there is, and the routing iinformation of the resource includes globally unique resource name, resource
The positional information of attribute and the timestamp for creating or deleting resource, if in the presence of, the timestamp of the renewal establishment or deletion resource,
And after one daily record of persistence simultaneously, to the request that deletion Resource Properties are initiated from node;
The Resource Properties are deleted in the request of the deletion Resource Properties from node, received for basis, if described
Resource Properties delete failure, and returning to resource to the host node deletes failure.
60. equipment according to claim 59, wherein, it is described from node, it is additionally operable to according to the deletion received
After the Resource Properties are deleted in the request of Resource Properties, if deleting successfully, returning to resource to the host node deletes successfully, and
By the timestamp of the establishment or deletion resource compared with the timestamp in the daily record of same asset title, if identical,
Delete this daily record.
61. equipment according to claim 60, wherein, the host node, if being additionally operable to identical, delete this daily record
Afterwards, still existing daily record is scanned beyond after preset time;According to the daily record scanned, establishment and the deletion resource is deleted
When remaining routing iinformation.
62. equipment according to claim 61, wherein, the host node, it is additionally operable to, according to the daily record scanned, delete
Remaining routing iinformation, inquiry have the road of same asset title with the daily record scanned during establishment and the deletion resource
It whether there is by information, if being not present, delete the daily record.
63. equipment according to claim 62, wherein, host node, it is additionally operable to have in inquiry and the daily record scanned
After the routing iinformation for having same asset title whether there is, if in the presence of, the host node judge the timestamp of the daily record with
Whether the establishment of the same asset title inquired or the timestamp of deletion resource are identical, if differing, delete the daily record.
64. equipment according to claim 63, wherein, the host node, it is additionally operable to judging the timestamp of the daily record
With the establishment of same asset title inquired or delete resource timestamp it is whether identical after, if identical, according to resource category
Property positional information to it is corresponding from node initiate inquiry with the presence or absence of same asset title Resource Properties request;
The request of the Resource Properties for from node, being additionally operable to whether there is same asset title according to the inquiry is looked into
Ask, if in the presence of described that feedback existing for Resource Properties is sent from node to the host node;
The host node, it is additionally operable to the feedback according to existing for the Resource Properties and deletes the daily record.
65. equipment according to claim 64, wherein, it is described from node, it is additionally operable to whether there is according to the inquiry
After the request of the Resource Properties of same asset title is inquired about, if being not present, Resource Properties are sent not to the host node
Existing feedback;
The host node, be additionally operable to the feedback being not present according to the Resource Properties, judge again the timestamp of the daily record with
Whether the establishment of the same asset title inquired or the timestamp of deletion resource are identical;If identical, the daily record and road are deleted
By information.
66. equipment according to claim 65, wherein, the host node, be additionally operable to judge again the daily record when
Between the establishment of same asset title stabbing and inquire or delete resource timestamp it is whether identical after, if differing, delete
Except the daily record.
67. a kind of metadata storage device of resource, the metadata of the resource includes the routing iinformation and Resource Properties of resource,
Wherein, described device includes:
Host node, for storing the routing iinformation of the resource, the routing iinformation of the resource includes globally unique resource name
Claim the positional information with Resource Properties;From node, for storing the Resource Properties.
68. the storage device as described in claim 67, wherein, the routing iinformation of the resource also includes creating or deleting resource
Timestamp.
69. storage device as recited in claim 68, wherein, the host node also includes daily record, and the daily record includes and institute
State the routing iinformation identical resource name and timestamp of resource.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610642192.5A CN107704462B (en) | 2016-08-08 | 2016-08-08 | Resource metadata maintenance method, equipment and storage device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610642192.5A CN107704462B (en) | 2016-08-08 | 2016-08-08 | Resource metadata maintenance method, equipment and storage device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN107704462A true CN107704462A (en) | 2018-02-16 |
CN107704462B CN107704462B (en) | 2021-07-06 |
Family
ID=61169170
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201610642192.5A Active CN107704462B (en) | 2016-08-08 | 2016-08-08 | Resource metadata maintenance method, equipment and storage device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107704462B (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111400255A (en) * | 2019-09-26 | 2020-07-10 | 杭州海康威视系统技术有限公司 | Data cleaning method, device and equipment and storage medium |
Citations (14)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1652090A (en) * | 2005-02-23 | 2005-08-10 | 北京邦诺存储科技有限公司 | Data managing method for network storage system and network storage system constituted thereby |
CN101187930A (en) * | 2007-12-04 | 2008-05-28 | 浙江大学 | Distribution type file system dummy directory and name space implementing method |
US20110238830A1 (en) * | 2004-06-25 | 2011-09-29 | Dominic Giampaolo | Trusted index structure in a network environment |
CN102546749A (en) * | 2010-12-08 | 2012-07-04 | 中国电信股份有限公司 | Method for accessing mobile internet protocol (IP) network and IP bearer network |
CN102929789A (en) * | 2012-09-21 | 2013-02-13 | 曙光信息产业(北京)有限公司 | Record organizational method and record organizational structure |
CN102937964A (en) * | 2012-09-28 | 2013-02-20 | 无锡江南计算技术研究所 | Intelligent data service method based on distributed system |
CN103246716A (en) * | 2013-04-26 | 2013-08-14 | 中国传媒大学 | Object copy efficient management method based on object cluster file system and object copy efficient management system based on object cluster file system |
CN103310000A (en) * | 2013-06-25 | 2013-09-18 | 曙光信息产业(北京)有限公司 | Metadata management method |
CN103577123A (en) * | 2013-11-12 | 2014-02-12 | 河海大学 | Small file optimization storage method based on HDFS |
CN103986655A (en) * | 2014-05-20 | 2014-08-13 | 东南大学 | Network routing service construction method |
CN104281506A (en) * | 2014-07-10 | 2015-01-14 | 中国科学院计算技术研究所 | Data maintenance method and system for file system |
US20150269183A1 (en) * | 2014-03-19 | 2015-09-24 | Red Hat, Inc. | File replication using file content location identifiers |
CN105453021A (en) * | 2013-08-01 | 2016-03-30 | 经度企业快闪公司 | Systems and methods for atomic storage operations |
CN105718217A (en) * | 2016-01-18 | 2016-06-29 | 浪潮(北京)电子信息产业有限公司 | Method and device for maintaining data consistency of thin provisioning database |
-
2016
- 2016-08-08 CN CN201610642192.5A patent/CN107704462B/en active Active
Patent Citations (14)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20110238830A1 (en) * | 2004-06-25 | 2011-09-29 | Dominic Giampaolo | Trusted index structure in a network environment |
CN1652090A (en) * | 2005-02-23 | 2005-08-10 | 北京邦诺存储科技有限公司 | Data managing method for network storage system and network storage system constituted thereby |
CN101187930A (en) * | 2007-12-04 | 2008-05-28 | 浙江大学 | Distribution type file system dummy directory and name space implementing method |
CN102546749A (en) * | 2010-12-08 | 2012-07-04 | 中国电信股份有限公司 | Method for accessing mobile internet protocol (IP) network and IP bearer network |
CN102929789A (en) * | 2012-09-21 | 2013-02-13 | 曙光信息产业(北京)有限公司 | Record organizational method and record organizational structure |
CN102937964A (en) * | 2012-09-28 | 2013-02-20 | 无锡江南计算技术研究所 | Intelligent data service method based on distributed system |
CN103246716A (en) * | 2013-04-26 | 2013-08-14 | 中国传媒大学 | Object copy efficient management method based on object cluster file system and object copy efficient management system based on object cluster file system |
CN103310000A (en) * | 2013-06-25 | 2013-09-18 | 曙光信息产业(北京)有限公司 | Metadata management method |
CN105453021A (en) * | 2013-08-01 | 2016-03-30 | 经度企业快闪公司 | Systems and methods for atomic storage operations |
CN103577123A (en) * | 2013-11-12 | 2014-02-12 | 河海大学 | Small file optimization storage method based on HDFS |
US20150269183A1 (en) * | 2014-03-19 | 2015-09-24 | Red Hat, Inc. | File replication using file content location identifiers |
CN103986655A (en) * | 2014-05-20 | 2014-08-13 | 东南大学 | Network routing service construction method |
CN104281506A (en) * | 2014-07-10 | 2015-01-14 | 中国科学院计算技术研究所 | Data maintenance method and system for file system |
CN105718217A (en) * | 2016-01-18 | 2016-06-29 | 浪潮(北京)电子信息产业有限公司 | Method and device for maintaining data consistency of thin provisioning database |
Non-Patent Citations (3)
Title |
---|
DIANACODY: "【Hadoop】HDFS笔记(二):HDFS的HA机制和Federation机制", 《HTTPS://BLOG.CSDN.NET/DIANACODY/ARTICLE/DETAILS/39480971?UTM_SOURCE=BLOGXGWZ7&UTM_MEDIUM=DISTRIBUTE.PC_RELEVANT.NONE-TASK-BLOG-TITLE-2&SPM=1001.2101.3001.4242》 * |
战科宇 等: "分布式文件系统元数据服务器高可用性设计", 《小型微型计算机系统》 * |
陈杰: "大数据场景下的云存储技术与应用", 《中兴通讯技术》 * |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111400255A (en) * | 2019-09-26 | 2020-07-10 | 杭州海康威视系统技术有限公司 | Data cleaning method, device and equipment and storage medium |
CN111400255B (en) * | 2019-09-26 | 2023-04-28 | 杭州海康威视系统技术有限公司 | Data cleaning method, device and equipment and storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN107704462B (en) | 2021-07-06 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US8423581B2 (en) | Proxy support for special subtree entries in a directory information tree using attribute rules | |
CN102708165B (en) | Document handling method in distributed file system and device | |
CN102629247B (en) | Method, device and system for data processing | |
JP6534402B2 (en) | Method for handling data quality exceptions, computer programs and exception engines | |
CN108614837B (en) | File storage and retrieval method and device | |
CN105138571B (en) | Distributed file system and method for storing massive small files | |
US20120323864A1 (en) | Distributed de-duplication system and processing method thereof | |
CN107153644B (en) | Data synchronization method and device | |
CN104516974B (en) | A kind of management method and device of file system directories item | |
CN105095313B (en) | A kind of data access method and equipment | |
CN104020961A (en) | Distributed data storage method, device and system | |
CN106326239A (en) | Distributed file system and file meta-information management method thereof | |
US20170154073A1 (en) | System and method for retrieving data | |
CN106547646B (en) | Data backup and recovery method and data backup and recovery device | |
CN102193925A (en) | On-line multi-version management method and device for manuscripts in manuscript system | |
CN103546380A (en) | Message forwarding method and device based on strategy routing | |
CN107193827A (en) | Divide the idempotent control method and device of storehouse point table | |
US20160012070A1 (en) | Methods for managing a request to list previous versions of an object and devices thereof | |
US9348847B2 (en) | Data access control apparatus and data access control method | |
CN111190861B (en) | Hot spot file management method, server and computer readable storage medium | |
CN107704462A (en) | Metadata maintaining method, equipment and the storage device of resource | |
CN110263060B (en) | ERP electronic accessory management method and computer equipment | |
US9626378B2 (en) | Method for handling requests in a storage system and a storage node for a storage system | |
JP2005063374A (en) | Data management method, data management device, program for the same, and recording medium | |
KR20070038665A (en) | Distributed file system and operating method thereof |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |