CN108491549A - The creation method and device of file directory in a kind of distributed memory system - Google Patents

The creation method and device of file directory in a kind of distributed memory system Download PDF

Info

Publication number
CN108491549A
CN108491549A CN201810312603.3A CN201810312603A CN108491549A CN 108491549 A CN108491549 A CN 108491549A CN 201810312603 A CN201810312603 A CN 201810312603A CN 108491549 A CN108491549 A CN 108491549A
Authority
CN
China
Prior art keywords
catalogue
file
directory
destination node
file destination
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
Application number
CN201810312603.3A
Other languages
Chinese (zh)
Other versions
CN108491549B (en
Inventor
徐佳宏
李银
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Ipanel TV Inc
Original Assignee
Shenzhen Ipanel TV Inc
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Shenzhen Ipanel TV Inc filed Critical Shenzhen Ipanel TV Inc
Priority to CN201810312603.3A priority Critical patent/CN108491549B/en
Publication of CN108491549A publication Critical patent/CN108491549A/en
Application granted granted Critical
Publication of CN108491549B publication Critical patent/CN108491549B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

This application discloses the creation methods and device of file directory in a kind of distributed memory system, obtain store path of the file destination node in distributed memory system;According to store path of the file destination node in distributed memory system, the mapping relations of the file directory of the file destination node and the file directory and the file destination node of the file destination node are created, the file directory includes catalogue mark, directory path and parent mark;In the database by the file directory of the file destination node and the storage of the mapping relations of the file destination node, effective management of the user to file in distributed memory system is realized by file directory and the mapping relations of file node.

Description

The creation method and device of file directory in a kind of distributed memory system
Technical field
The present invention relates to technical field of distributed memory, more particularly to file mesh in a kind of distributed memory system The creation method and device of record.
Background technology
The directory management of distributed file system is unlike the catalogue of local file system, below the nodal information of catalogue Store subdirectory node and file node.It is most of to use file node in distributed file storage system.Each It is parallel relation between file node, and each file node can be according to certain rule numbers, the as mark of file. This file mark generally can include file the path of the disk of distributed storage, be stored in which disk which The information such as position.And this file is readable poor for ordinary user.It manages relatively difficult.For example user wants to delete The a certain batch file of oneself, this batch file need user oneself to record, otherwise do not know which file is oneself.
Invention content
In view of this, the present invention provides the creation method and device of file directory in a kind of distributed memory system, lead to The mapping relations for crossing file directory and file node realize effective management of the user to file in distributed memory system.
The creation method of file directory in a kind of distributed memory system, including:
Obtain store path of the file destination node in distributed memory system;
According to store path of the file destination node in distributed memory system, the file destination node is created File directory and the file destination node file directory and the file destination node mapping relations;
The mapping relations of the file directory of the file destination node and the file destination node are stored in database In.
Optionally, the file directory includes catalogue mark, directory path and parent mark.
Optionally, the store path according to the file destination node in distributed memory system, described in establishment The file directory of file destination node, including:
The filename of the file destination node is added to the file destination node in distributed memory system The end of store path obtains the directory path of the file destination node;
The directory path of the file destination node is parsed, the multiple grades of the file destination node are obtained Catalogue;
Since root, the hierarchical relationship by the catalogue of the multiple grades of the file destination node is literary to the target The catalogue of the multiple grades of part node is traversed, and current directory is obtained, and the current directory is the current catalogue traversed;
Judge to whether there is the current directory in database;
If in the presence of, judge the current directory whether be the file destination node multiple grades catalogue in it is last One layer of catalogue;
If last layer of catalogue, terminate the traversal of the catalogue to the multiple grades of the file destination node;
If not the subdirectory of the current directory, is determined as new current directory, and return and hold by last layer of catalogue It whether there is the current directory in the row judgement database;
If being not present, the current directory is created in the database, obtains the mark of the current directory, and work as by described in The mark of the parent catalogue of preceding catalogue is set as the mark of the catalogue of the current directory last layer grade, and returns and sentence described in execution Break the current directory whether be the file destination node multiple grades catalogue in last layer of catalogue.
Optionally, the method further includes:
Receive the inquiry request for carrying benchmark catalogue that user sends;
Judge that the benchmark catalogue whether there is in the database;
If being not present, it is not present to benchmark catalogue described in the user feedback;
If in the presence of the corresponding file directory of the benchmark catalogue or file node is inquired in the database, and to the use Feed back the corresponding file directory of the benchmark catalogue or file node in family.
Optionally, the method further includes:
Receive the removal request for carrying benchmark catalogue that user sends;
Judge that the benchmark catalogue whether there is in the database;
If being not present, it is not present to benchmark catalogue described in the user feedback;
If in the presence of the corresponding catalogue mark of the benchmark catalogue is inquired in the database, and judge whether deposited in database In the file directory for being identified as parent mark with the corresponding catalogue of the benchmark catalogue;
If there are file directory, to the user feedback directory delete failure information;
If file directory is not present, the corresponding file directory of the benchmark catalogue is deleted, and to the user feedback catalogue Delete successful information.
Optionally, the method further includes:
Receive the file deletion requests for carrying benchmark catalogue that user sends;
Judge that the benchmark catalogue whether there is in the database;
If being not present, it is not present to benchmark catalogue described in the user feedback;
If in the presence of the corresponding file node of the benchmark catalogue is inquired in the database, and delete the file node pair The file answered, and delete successful information to the user feedback file.
The creating device of file directory in a kind of distributed memory system, including:
Acquiring unit, for obtaining store path of the file destination node in distributed memory system;
Creating unit creates institute for the store path according to the file destination node in distributed memory system State file directory and the file directory of the file destination node and the reflecting for the file destination node of file destination node Penetrate relationship;
Storage unit is used for the mapping relations of the file directory of the file destination node and the file destination node Storage is in the database.
Optionally, the file directory includes catalogue mark, directory path and parent mark.
Optionally, the creating unit, specifically for the filename of the file destination node is added to the target The end of store path of the file node in distributed memory system obtains the directory path of the file destination node;It is right The directory path of the file destination node is parsed, and the catalogue of the multiple grades of the file destination node is obtained;From root Catalogue starts, by the multiple grades of the file destination node catalogue hierarchical relationship to the multiple of the file destination node The catalogue of grade is traversed, and current directory is obtained, and the current directory is the current catalogue traversed;Judge in database With the presence or absence of the current directory;If in the presence of, judge the current directory whether be the file destination node multiple grades Catalogue in last layer of catalogue;If last layer of catalogue, terminate the mesh to the multiple grades of the file destination node The traversal of record;If not the subdirectory of the current directory, is determined as new current directory, and return and hold by last layer of catalogue It whether there is the current directory in the row judgement database;If being not present, the current directory is created in the database, is obtained It is set as the current directory last layer to the mark of the current directory, and by the mark of the parent catalogue of the current directory Grade catalogue mark, and return execute it is described judge the current directory whether be the file destination node multiple grades Catalogue in last layer of catalogue.
Optionally, described device further includes:
Query unit, the inquiry request for carrying benchmark catalogue for receiving user's transmission;Judge the benchmark catalogue It whether there is in the database;If being not present, it is not present to benchmark catalogue described in the user feedback;If in the presence of in database It is middle to inquire the corresponding file directory of the benchmark catalogue or file node and corresponding to benchmark catalogue described in the user feedback File directory or file node.
Optionally, described device further includes:
Directory delete unit, the removal request for carrying benchmark catalogue for receiving user's transmission;Judge the benchmark Catalogue whether there is in the database;If being not present, it is not present to benchmark catalogue described in the user feedback;If in the presence of in number It is identified according to the corresponding catalogue of the benchmark catalogue is inquired in library, and judges to correspond to the presence or absence of with the benchmark catalogue in database Catalogue be identified as parent mark file directory;If there are file directory, to the user feedback directory delete failure information; If file directory is not present, the corresponding file directory of the benchmark catalogue is deleted, and successful to the user feedback directory delete Information.
Optionally, described device further includes:
File deleting unit, the file deletion requests for carrying benchmark catalogue for receiving user's transmission;Described in judgement Benchmark catalogue whether there is in the database;If being not present, it is not present to benchmark catalogue described in the user feedback;If in the presence of, The corresponding file node of the benchmark catalogue is inquired in the database, and deletes the corresponding file of the file node, and to institute It states user feedback file and deletes successful information.
Compared with the existing technology, beneficial effects of the present invention are as follows:
The creation method and device of file directory in a kind of distributed memory system disclosed by the invention, according to file destination Store path of the node in distributed memory system creates the file directory and file destination node of file destination node File directory and file destination node mapping relations, and by the file directory of file destination node and file destination node Mapping relations store in the database.When user needs to access some file, it is only necessary to be existed according to the store path of this document Inquiry can be obtained by the corresponding file node of this document in database, realize that user has file in distributed memory system Effect management.
Description of the drawings
In order to more clearly explain the embodiment of the invention or the technical proposal in the existing technology, to embodiment or will show below There is attached drawing needed in technology description to be briefly described, it should be apparent that, the accompanying drawings in the following description is only this The embodiment of invention for those of ordinary skill in the art without creative efforts, can also basis The attached drawing of offer obtains other attached drawings.
Fig. 1 is the creation method flow chart of file directory in a kind of distributed memory system disclosed by the embodiments of the present invention;
Fig. 2 is a kind of creation method flow chart of file directory disclosed by the embodiments of the present invention;
Fig. 3 is a kind of directory method flow diagram disclosed by the embodiments of the present invention;
Fig. 4 is a kind of directory delete method flow diagram disclosed by the embodiments of the present invention;
Fig. 5 is a kind of file delet method flow chart disclosed by the embodiments of the present invention;
Fig. 6 is the creating device structural representation of file directory in a kind of distributed memory system disclosed by the embodiments of the present invention Figure.
Specific implementation mode
Following will be combined with the drawings in the embodiments of the present invention, and technical solution in the embodiment of the present invention carries out clear, complete Site preparation describes, it is clear that described embodiments are only a part of the embodiments of the present invention, instead of all the embodiments.It is based on Embodiment in the present invention, it is obtained by those of ordinary skill in the art without making creative efforts every other Embodiment shall fall within the protection scope of the present invention.
Referring to Fig. 1, present embodiment discloses a kind of creation method of file directory in distributed memory system, it is specific to wrap Include following steps:
S101:Obtain store path of the file destination node in distributed memory system;
S102:According to store path of the file destination node in distributed memory system, the target text is created The mapping relations of the file directory of part node and the file directory of the file destination node and the file destination node;
Optionally, the file directory includes catalogue mark, directory path and parent mark.
On this basis, referring to Fig. 2, the storage according to the file destination node in distributed memory system Path creates the file directory of the file destination node, including:
S201:The filename of the file destination node is added to the file destination node in distributed memory system In store path end, obtain the directory path of the file destination node;
S202:The directory path of the file destination node is parsed, the multiple of the file destination node are obtained The catalogue of grade;
S203:Since root, by the multiple grades of the file destination node catalogue hierarchical relationship to described The catalogue of the multiple grades of file destination node is traversed, and current directory is obtained;
The current directory is the current catalogue traversed;
S204:Judge to whether there is the current directory in database;
If in the presence of S205 is executed:Judge the current directory whether be the file destination node multiple grades mesh Last layer of catalogue in record;
If last layer of catalogue, S206 is executed:Terminate time of the catalogue to the multiple grades of the file destination node It goes through;
If not last layer of catalogue, executes S207:The subdirectory of the current directory is determined as to new current directory, And it returns and executes S204;
If being not present, S208 is executed:The current directory is created in the database, obtains the mark of the current directory, And set the mark of the parent catalogue of the current directory to the mark of the catalogue of the current directory last layer grade, and return Execute S207.
By taking store path is "/home/second " file entitled " third " as an example, the catalogue of file destination node is obtained Path is "/home/second/third ".
First, we first carry out "/home/second/third " to split into catalogue form below
/
/home
/home/second
/home/second/third
Then, it checks that "/" root whether there is, if being not present, creates "/" catalogue in the database, please refer to table 1, Catalogue is identified as 1, and parent is identified as 0.If in the presence of not having to create, obtain " the catalogue mark " of the root.
Third checks that "/home " catalogue whether there is, if being not present, creates the record of the catalogue, generates one uniquely Catalogue identifies, and parent mark is set as last layer catalogue mark;If in the presence of not repeating to create.It obtains " the catalogue mark " of this grade.
4th, it checks that "/home/second " catalogue whether there is, if being not present, creates the record of the catalogue, generate one A unique catalogue mark, parent mark are set as last layer catalogue mark;If in the presence of not repeating to create.Obtain " the mesh of this grade Record mark ".
5th, it checks that "/home/second/third " catalogue whether there is, if being not present, creates the record of the catalogue, A unique catalogue mark is generated, parent mark is set as the catalogue mark of last layer;If in the presence of not repeating to create.It obtains " the catalogue mark " of this grade.
S103:The mapping relations of the file directory of the file destination node and the file destination node are stored in number According in library.
Catalogue identifies:Described for catalogue, the mark of root since 1, behind all catalogues it is corresponding Catalogue mark is all unduplicated.
Directory path:Here there are the path of catalogue or the path of file in path, and path here is started with "/" Absolute path.Centre does not allow that there are in relative path " " or " path description of .. ".The ending of file or catalogue is uncomfortable With "/' ending.It may include space among path.The description in the previous section path of subdirectory or subfile must be with parent Path is identical.
Parent identifies:This indicates which the catalogue of the upper level of record is, for determining this catalogue or file category In which catalogue.The parent of root "/" is identified as 0. expression root, and other all subdirectories or file all point to him Upper level catalogue, the mark be which catalogue under index search subdirectory facilitate index use.Improve index effect Rate.
File node:If there are file associations for the row, there are corresponding values;It is sky if the value in the catalogue row.This article Part node is to establish associated record information with actual file.
Please refer to table 1, the table of the mapping relations of the file directory and file destination node of storage file node in database It is as follows:
Table 1
The creation method of file directory in a kind of distributed memory system disclosed in the present embodiment, according to file destination node Store path in distributed memory system creates the file directory of file destination node and the text of file destination node The mapping relations of part catalogue and file destination node, and by the mapping of the file directory of file destination node and file destination node Relationship stores in the database.When user needs to access some file, it is only necessary to according to the store path of this document in data Inquiry can be obtained by the corresponding file node of this document in library, realize effective pipe of the user to file in distributed memory system Reason.
When the mapping relations of the file directory of the file destination node and the file destination node are stored in data After in library, file directory can be inquired, referring specifically to Fig. 3, directory method specifically includes following steps:
S301:Receive the inquiry request for carrying benchmark catalogue that user sends;
S302:Judge that the benchmark catalogue whether there is in the database;
If being not present, S303 is executed:It is not present to benchmark catalogue described in the user feedback;
If in the presence of S304 is executed:The corresponding file directory of the benchmark catalogue or file node are inquired in the database, and To the corresponding file directory of benchmark catalogue or file node described in the user feedback.
User gives a benchmark catalogue and gets all catalogues under the catalogue in the database using benchmark catalogue Or file.
First, check that the benchmark catalogue that user gives whether there is.It is given that user is inquired in " directory path " this row Catalogue whether there is, if being not present, be not present to benchmark catalogue described in the user feedback.Otherwise the catalogue is inquired " catalogue mark ", " parent mark " and " file node " 3 information.And " file node " field is sky, indicates that user is given Benchmark catalogue be a catalogue, otherwise user inquiry be a file, be not catalogue.Assuming that inquiry path be "/ Home ", " the catalogue mark " inquired are 2, and " parent mark " is 1.
Second, by " the catalogue mark " inquired, in searching database table, " parent mark " is " catalogue inquired The record of mark ".Assuming that query path is all subdirectories of "/home ", file is filtered out.Inquiry mode is all " parents All records that mark " is 2 and " file node " is sky.Query result is as follows:
/home/name1
/home/name2
The result inquired is fed back into user.
The present invention also supports directory delete function, referring to Fig. 4, a kind of directory delete method includes:
S401:Receive the removal request for carrying benchmark catalogue that user sends;
S402:Judge that the benchmark catalogue whether there is in the database;
If being not present, S403 is executed:It is not present to benchmark catalogue described in the user feedback;
If in the presence of S404 is executed:The corresponding catalogue mark of the benchmark catalogue is inquired in the database;
S405:Judge in database with the presence or absence of the file for being identified as parent mark with the corresponding catalogue of the benchmark catalogue Catalogue;
If there are file directory, S406 is executed:To the user feedback directory delete failure information;
If file directory is not present, S407 is executed:Delete the corresponding file directory of the benchmark catalogue, and to the user Feed back directory delete successful information.
The most basic requirement to deltree is that catalogue must be empty list.Any specific item is not present below given catalogue Record or file.Specific propagation is as follows:
Assuming that needing to delete there are one catalogue "/home ".
It first checks for this catalogue whether there is, if being not present, direct feedback User Catalog is not present.
Second, it checks and exists, obtain " the catalogue mark " of the catalogue.
Third, " parent mark " in searching database table, if given path can be retrieved in " parent mark " Corresponding " catalogue mark ".It is empty to illustrate the catalogue not, directly returns and deletes failure.
4th, the record number being retrieved is 0, directly deletes the catalogue, feedback user success.
The present invention also supports file to delete function, referring to Fig. 5, a kind of file delet method includes the following steps:
S501:Receive the file deletion requests for carrying benchmark catalogue that user sends;
S502:Judge that the benchmark catalogue whether there is in the database;
If being not present, S503 is executed:It is not present to benchmark catalogue described in the user feedback;
If in the presence of S504 is executed:The corresponding file node of the benchmark catalogue is inquired in the database, and deletes the text The corresponding file of part node, and delete successful information to the user feedback file.
It is understood that file deletes the path of leading the way fairly simple, lookup user gives directly in database table Filename.Searching database returns to failure if being not present;If in the presence of " file node " information in the record is extracted, together When Delete query arrive this record.Then according to the particular content information of file node deletion file.
Based on the creation method of file directory in a kind of distributed memory system disclosed in above-described embodiment, referring to Fig. 6, The present embodiment corresponds to the creating device for disclosing file directory in a kind of distributed memory system, specifically includes:
Acquiring unit 601, for obtaining store path of the file destination node in distributed memory system;
Creating unit 602 is created for the store path according to the file destination node in distributed memory system The file directory of the file destination node and the file directory of the file destination node and the file destination node Mapping relations;
Optionally, the file directory includes catalogue mark, directory path and parent mark.
On this basis, the creating unit 602, specifically for the filename of the file destination node is added to institute The end for stating store path of the file destination node in distributed memory system obtains the catalogue road of the file destination node Diameter;The directory path of the file destination node is parsed, the catalogue of the multiple grades of the file destination node is obtained; Since root, by the multiple grades of the file destination node catalogue hierarchical relationship to the file destination node The catalogue of multiple grades is traversed, and current directory is obtained, and the current directory is the current catalogue traversed;Judge data It whether there is the current directory in library;If in the presence of judging whether the current directory is the multiple of the file destination node Last layer of catalogue in the catalogue of grade;If last layer of catalogue, terminate the multiple grades to the file destination node Catalogue traversal;If not the subdirectory of the current directory, is determined as new current directory, and return by last layer of catalogue Judge to whether there is the current directory in database described in receipt row;If being not present, the current mesh is created in the database Record, obtains the mark of the current directory, and set the mark of the parent catalogue of the current directory to the current directory The mark of the catalogue of last layer grade, and return to execute and described judge whether the current directory is the more of the file destination node Last layer of catalogue in the catalogue of a grade.
Storage unit 603 is used for the mapping of the file directory of the file destination node and the file destination node Relationship stores in the database.
Optionally, described device further includes:
Query unit, the inquiry request for carrying benchmark catalogue for receiving user's transmission;Judge the benchmark catalogue It whether there is in the database;If being not present, it is not present to benchmark catalogue described in the user feedback;If in the presence of in database It is middle to inquire the corresponding file directory of the benchmark catalogue or file node and corresponding to benchmark catalogue described in the user feedback File directory or file node.
Directory delete unit, the removal request for carrying benchmark catalogue for receiving user's transmission;Judge the benchmark Catalogue whether there is in the database;If being not present, it is not present to benchmark catalogue described in the user feedback;If in the presence of in number It is identified according to the corresponding catalogue of the benchmark catalogue is inquired in library, and judges to correspond to the presence or absence of with the benchmark catalogue in database Catalogue be identified as parent mark file directory;If there are file directory, to the user feedback directory delete failure information; If file directory is not present, the corresponding file directory of the benchmark catalogue is deleted, and successful to the user feedback directory delete Information.
File deleting unit, the file deletion requests for carrying benchmark catalogue for receiving user's transmission;Described in judgement Benchmark catalogue whether there is in the database;If being not present, it is not present to benchmark catalogue described in the user feedback;If in the presence of, The corresponding file node of the benchmark catalogue is inquired in the database, and deletes the corresponding file of the file node, and to institute It states user feedback file and deletes successful information.
The creating device of file directory in a kind of distributed memory system disclosed in the present embodiment, according to file destination node Store path in distributed memory system creates the file directory of file destination node and the text of file destination node The mapping relations of part catalogue and file destination node, and by the mapping of the file directory of file destination node and file destination node Relationship stores in the database.When user needs to access some file, it is only necessary to according to the store path of this document in data Inquiry can be obtained by the corresponding file node of this document in library, realize effective pipe of the user to file in distributed memory system Reason.
The foregoing description of the disclosed embodiments enables those skilled in the art to implement or use the present invention. Various modifications to these embodiments will be apparent to those skilled in the art, as defined herein General Principle can be realized in other embodiments without departing from the spirit or scope of the present invention.Therefore, of the invention It is not intended to be limited to the embodiments shown herein, and is to fit to and the principles and novel features disclosed herein phase one The widest range caused.

Claims (12)

1. the creation method of file directory in a kind of distributed memory system, which is characterized in that including:
Obtain store path of the file destination node in distributed memory system;
According to store path of the file destination node in distributed memory system, the text of the file destination node is created The mapping relations of part catalogue and the file directory of the file destination node and the file destination node;
In the database by the file directory of the file destination node and the storage of the mapping relations of the file destination node.
2. according to the method described in claim 1, it is characterized in that, the file directory include catalogue mark, directory path and Parent identifies.
3. according to the method described in claim 2, it is characterized in that, it is described according to the file destination node in distributed storage Store path in system creates the file directory of the file destination node, including:
The filename of the file destination node is added to storage of the file destination node in distributed memory system The end in path obtains the directory path of the file destination node;
The directory path of the file destination node is parsed, the mesh of the multiple grades of the file destination node is obtained Record;
Since root, by the multiple grades of the file destination node catalogue hierarchical relationship to the file destination section The catalogue of the multiple grades of point is traversed, and current directory is obtained, and the current directory is the current catalogue traversed;
Judge to whether there is the current directory in database;
If in the presence of, judge the current directory whether be the file destination node multiple grades catalogue in last layer Catalogue;
If last layer of catalogue, terminate the traversal of the catalogue to the multiple grades of the file destination node;
If not the subdirectory of the current directory, is determined as new current directory by last layer of catalogue, and returns and execute institute It states and judges to whether there is the current directory in database;
If being not present, the current directory is created in the database, obtains the mark of the current directory, and by the current mesh The mark of the parent catalogue of record is set as the mark of the catalogue of the current directory last layer grade, and returns and execute the judgement institute State current directory whether be the file destination node multiple grades catalogue in last layer of catalogue.
4. according to the method described in right 1, which is characterized in that the method further includes:
Receive the inquiry request for carrying benchmark catalogue that user sends;
Judge that the benchmark catalogue whether there is in the database;
If being not present, it is not present to benchmark catalogue described in the user feedback;
If in the presence of the corresponding file directory of the benchmark catalogue or file node is inquired in the database, and anti-to the user Present the corresponding file directory of the benchmark catalogue or file node.
5. according to the method described in claim 1, it is characterized in that, the method further includes:
Receive the removal request for carrying benchmark catalogue that user sends;
Judge that the benchmark catalogue whether there is in the database;
If being not present, it is not present to benchmark catalogue described in the user feedback;
If in the presence of, inquire the benchmark catalogue corresponding catalogue mark in the database, and judge in database with the presence or absence of with The corresponding catalogue of the benchmark catalogue is identified as the file directory of parent mark;
If there are file directory, to the user feedback directory delete failure information;
If file directory is not present, the corresponding file directory of the benchmark catalogue is deleted, and to the user feedback directory delete Successful information.
6. according to the method described in claim 1, it is characterized in that, the method further includes:
Receive the file deletion requests for carrying benchmark catalogue that user sends;
Judge that the benchmark catalogue whether there is in the database;
If being not present, it is not present to benchmark catalogue described in the user feedback;
If in the presence of the corresponding file node of the benchmark catalogue is inquired in the database, and it is corresponding to delete the file node File, and delete successful information to the user feedback file.
7. the creating device of file directory in a kind of distributed memory system, which is characterized in that including:
Acquiring unit, for obtaining store path of the file destination node in distributed memory system;
Creating unit creates the mesh for the store path according to the file destination node in distributed memory system Mark the mapping pass of the file directory of file node and the file directory and the file destination node of the file destination node System;
Storage unit, for storing the mapping relations of the file directory of the file destination node and the file destination node In the database.
8. device according to claim 7, which is characterized in that the file directory include catalogue mark, directory path and Parent identifies.
9. device according to claim 8, which is characterized in that
The creating unit is being divided specifically for the filename of the file destination node is added to the file destination node The end of store path in cloth storage system obtains the directory path of the file destination node;To the file destination The directory path of node is parsed, and the catalogue of the multiple grades of the file destination node is obtained;Since root, by institute State the hierarchical relationship of the catalogue of the multiple grades of file destination node to the catalogues of the multiple grades of the file destination node into Row traversal, obtains current directory, and the current directory is the current catalogue traversed;Judge in database with the presence or absence of described Current directory;If in the presence of, judge the current directory whether be the file destination node multiple grades catalogue in most Later layer catalogue;If last layer of catalogue, terminate the traversal of the catalogue to the multiple grades of the file destination node;If no It is last layer of catalogue, the subdirectory of the current directory is determined as to new current directory, and returns and execute the judgement number According in library whether there is the current directory;If being not present, the current directory is created in the database, obtains the current mesh The mark of record, and set the mark of the parent catalogue of the current directory to the mark of the catalogue of the current directory last layer grade Know, and return execute it is described judge the current directory whether be the file destination node multiple grades catalogue in most Later layer catalogue.
10. according to the device described in right 7, which is characterized in that described device further includes:
Query unit, the inquiry request for carrying benchmark catalogue for receiving user's transmission;Judge the benchmark catalogue in number According to whether there is in library;If being not present, it is not present to benchmark catalogue described in the user feedback;If in the presence of looking into the database Ask the corresponding file directory of the benchmark catalogue or file node, and to the corresponding file of benchmark catalogue described in the user feedback Catalogue or file node.
11. device according to claim 7, which is characterized in that described device further includes:
Directory delete unit, the removal request for carrying benchmark catalogue for receiving user's transmission;Judge the benchmark catalogue It whether there is in the database;If being not present, it is not present to benchmark catalogue described in the user feedback;If in the presence of in database It is middle to inquire the corresponding catalogue mark of the benchmark catalogue, and judge in database with the presence or absence of with the corresponding mesh of the benchmark catalogue Record is identified as the file directory of parent mark;If there are file directory, to the user feedback directory delete failure information;If no There are file directory, the corresponding file directory of the benchmark catalogue is deleted, and to the user feedback directory delete successful information.
12. device according to claim 7, which is characterized in that described device further includes:
File deleting unit, the file deletion requests for carrying benchmark catalogue for receiving user's transmission;Judge the benchmark Catalogue whether there is in the database;If being not present, it is not present to benchmark catalogue described in the user feedback;If in the presence of in number According to inquiring the corresponding file node of the benchmark catalogue in library, and the corresponding file of the file node is deleted, and to the use Family feedback file deletes successful information.
CN201810312603.3A 2018-04-09 2018-04-09 Method and device for creating file directory in distributed storage system Active CN108491549B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810312603.3A CN108491549B (en) 2018-04-09 2018-04-09 Method and device for creating file directory in distributed storage system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810312603.3A CN108491549B (en) 2018-04-09 2018-04-09 Method and device for creating file directory in distributed storage system

Publications (2)

Publication Number Publication Date
CN108491549A true CN108491549A (en) 2018-09-04
CN108491549B CN108491549B (en) 2022-02-01

Family

ID=63315166

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810312603.3A Active CN108491549B (en) 2018-04-09 2018-04-09 Method and device for creating file directory in distributed storage system

Country Status (1)

Country Link
CN (1) CN108491549B (en)

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109284629A (en) * 2018-09-13 2019-01-29 郑州云海信息技术有限公司 A kind of authority control method and system of distributed file storage system
CN109783449A (en) * 2018-12-13 2019-05-21 深圳壹账通智能科技有限公司 Data query processing method, platform, system and readable storage medium storing program for executing
CN110765073A (en) * 2019-09-11 2020-02-07 厦门卫星定位应用股份有限公司 File management method, medium, device and apparatus for distributed storage system
CN111209259A (en) * 2018-11-22 2020-05-29 杭州海康威视系统技术有限公司 NAS distributed file system and data processing method
CN111966633A (en) * 2020-08-14 2020-11-20 北京百度网讯科技有限公司 Method, device, electronic equipment and medium for inquiring child nodes under directory
CN112148680A (en) * 2020-09-27 2020-12-29 极道科技(北京)有限公司 File system metadata management method based on distributed graph database
CN112612749A (en) * 2020-12-15 2021-04-06 重庆电子工程职业学院 Intelligent safety management storage system
CN113282551A (en) * 2021-07-22 2021-08-20 阿里云计算有限公司 Data processing method, system and equipment
CN114168549A (en) * 2021-12-10 2022-03-11 中国建设银行股份有限公司 File processing method and device
WO2024041035A1 (en) * 2022-08-23 2024-02-29 网络通信与安全紫金山实验室 Machine learning model management method and device, model management platform, and storage medium
CN118093531A (en) * 2024-04-01 2024-05-28 北京长亭科技有限公司 Management method and device for mass small files, electronic equipment and storage medium

Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102622412A (en) * 2011-11-28 2012-08-01 中兴通讯股份有限公司 Method and device of concurrent writes for distributed file system
CN102779185A (en) * 2012-06-29 2012-11-14 浙江大学 High-availability distribution type full-text index method
CN103064906A (en) * 2012-12-18 2013-04-24 华为技术有限公司 File management method and device
CN103150394A (en) * 2013-03-25 2013-06-12 中国人民解放军国防科学技术大学 Distributed file system metadata management method facing to high-performance calculation
CN104537076A (en) * 2014-12-31 2015-04-22 北京奇艺世纪科技有限公司 File reading and writing method and device
CN105989007A (en) * 2015-01-27 2016-10-05 珠海金山办公软件有限公司 File path processing method and device
US20170132265A1 (en) * 2008-05-21 2017-05-11 Qualcomm Incorporated Distributed system for application processing
CN106682003A (en) * 2015-11-06 2017-05-17 中国电信股份有限公司 Path segmentation mapping method and device for distributed memory namespace
CN106874370A (en) * 2016-12-30 2017-06-20 厦门天锐科技股份有限公司 A kind of method for quickly retrieving of catalogue file
CN106919347A (en) * 2017-02-28 2017-07-04 北京华云网际科技有限公司 The creation method and device of the catalogue of distributed block storage system
CN107341207A (en) * 2017-06-23 2017-11-10 深圳市盛路物联通讯技术有限公司 A kind of node information management method and device

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170132265A1 (en) * 2008-05-21 2017-05-11 Qualcomm Incorporated Distributed system for application processing
CN102622412A (en) * 2011-11-28 2012-08-01 中兴通讯股份有限公司 Method and device of concurrent writes for distributed file system
CN102779185A (en) * 2012-06-29 2012-11-14 浙江大学 High-availability distribution type full-text index method
CN103064906A (en) * 2012-12-18 2013-04-24 华为技术有限公司 File management method and device
CN103150394A (en) * 2013-03-25 2013-06-12 中国人民解放军国防科学技术大学 Distributed file system metadata management method facing to high-performance calculation
CN104537076A (en) * 2014-12-31 2015-04-22 北京奇艺世纪科技有限公司 File reading and writing method and device
CN105989007A (en) * 2015-01-27 2016-10-05 珠海金山办公软件有限公司 File path processing method and device
CN106682003A (en) * 2015-11-06 2017-05-17 中国电信股份有限公司 Path segmentation mapping method and device for distributed memory namespace
CN106874370A (en) * 2016-12-30 2017-06-20 厦门天锐科技股份有限公司 A kind of method for quickly retrieving of catalogue file
CN106919347A (en) * 2017-02-28 2017-07-04 北京华云网际科技有限公司 The creation method and device of the catalogue of distributed block storage system
CN107341207A (en) * 2017-06-23 2017-11-10 深圳市盛路物联通讯技术有限公司 A kind of node information management method and device

Cited By (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109284629B (en) * 2018-09-13 2021-08-31 郑州云海信息技术有限公司 Authority control method and system of distributed file storage system
CN109284629A (en) * 2018-09-13 2019-01-29 郑州云海信息技术有限公司 A kind of authority control method and system of distributed file storage system
CN111209259A (en) * 2018-11-22 2020-05-29 杭州海康威视系统技术有限公司 NAS distributed file system and data processing method
CN111209259B (en) * 2018-11-22 2023-09-05 杭州海康威视系统技术有限公司 NAS distributed file system and data processing method
CN109783449A (en) * 2018-12-13 2019-05-21 深圳壹账通智能科技有限公司 Data query processing method, platform, system and readable storage medium storing program for executing
CN110765073A (en) * 2019-09-11 2020-02-07 厦门卫星定位应用股份有限公司 File management method, medium, device and apparatus for distributed storage system
CN110765073B (en) * 2019-09-11 2022-06-07 厦门卫星定位应用股份有限公司 File management method, medium, device and apparatus for distributed storage system
CN111966633A (en) * 2020-08-14 2020-11-20 北京百度网讯科技有限公司 Method, device, electronic equipment and medium for inquiring child nodes under directory
CN111966633B (en) * 2020-08-14 2024-04-09 北京百度网讯科技有限公司 Method, device, electronic equipment and medium for inquiring child node under directory
CN112148680A (en) * 2020-09-27 2020-12-29 极道科技(北京)有限公司 File system metadata management method based on distributed graph database
CN112148680B (en) * 2020-09-27 2024-04-05 极道科技(北京)有限公司 File system metadata management method based on distributed graph database
CN112612749A (en) * 2020-12-15 2021-04-06 重庆电子工程职业学院 Intelligent safety management storage system
CN113282551A (en) * 2021-07-22 2021-08-20 阿里云计算有限公司 Data processing method, system and equipment
CN114168549A (en) * 2021-12-10 2022-03-11 中国建设银行股份有限公司 File processing method and device
WO2024041035A1 (en) * 2022-08-23 2024-02-29 网络通信与安全紫金山实验室 Machine learning model management method and device, model management platform, and storage medium
CN118093531A (en) * 2024-04-01 2024-05-28 北京长亭科技有限公司 Management method and device for mass small files, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN108491549B (en) 2022-02-01

Similar Documents

Publication Publication Date Title
CN108491549A (en) The creation method and device of file directory in a kind of distributed memory system
US8255430B2 (en) Shared namespace for storage clusters
US7469260B2 (en) File storage service system, file management device, file management method, ID denotative NAS server and file reading method
CN110321325B (en) File index node searching method, terminal, server, system and storage medium
US7849112B2 (en) Using a file handle for associating the file with a tree quota in a file server
CN101334785B (en) Method for organizing dummy catalog and managing naming space for distributed file systems
JP5628799B2 (en) Personal information file management tool
CN109684282A (en) A kind of method and device constructing metadata cache
US20070260630A1 (en) Method and system for attribute management in a namespace
CN104516974B (en) A kind of management method and device of file system directories item
US20110082879A1 (en) Proxy Support For Special Subtree Entries In A Directory Information Tree Using Attribute Rules
US20120131128A1 (en) System and method for generating a consistent user name-space on networked devices
JP2006012125A (en) Method and system for indexing and searching databases
US20040064483A1 (en) Method and system of compacting sparse directories in a file system
CN108197270A (en) distributed file system data recovery method
JP2012531688A (en) Method for accessing file system file according to metadata, and apparatus for implementing the method
CN102891872A (en) Method and system for storing and searching data in peer to peer (P2P) network
CN106227830A (en) Storage and the method and apparatus reading file
US7818680B2 (en) Method for deleting related messages
JPWO2004109517A1 (en) Storage management program and file processing program
EP3958139B1 (en) Method and system for creating files in a file system
EP2420945A1 (en) Foldering by stable query
JP4343669B2 (en) File management device, dynamic namespace generation method, and dynamic namespace generation program
US11048666B2 (en) Method and apparatus for shallow copy functionality
US20180089225A9 (en) Tag pyramid data management system

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