WO2016086649A1 - 写、读、删除、查询文件的方法、客户端和存储介质 - Google Patents

写、读、删除、查询文件的方法、客户端和存储介质 Download PDF

Info

Publication number
WO2016086649A1
WO2016086649A1 PCT/CN2015/082131 CN2015082131W WO2016086649A1 WO 2016086649 A1 WO2016086649 A1 WO 2016086649A1 CN 2015082131 W CN2015082131 W CN 2015082131W WO 2016086649 A1 WO2016086649 A1 WO 2016086649A1
Authority
WO
WIPO (PCT)
Prior art keywords
metadata
file
request
server
application
Prior art date
Application number
PCT/CN2015/082131
Other languages
English (en)
French (fr)
Inventor
林健
尹丹
朱鹏
Original Assignee
中兴通讯股份有限公司
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 中兴通讯股份有限公司 filed Critical 中兴通讯股份有限公司
Publication of WO2016086649A1 publication Critical patent/WO2016086649A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor

Definitions

  • the present invention relates to the field of distributed file systems, and more particularly to a method of writing a file, reading a file, deleting a file, querying a file, and a client and a computer storage medium.
  • the file size has also risen rapidly from tens of millions to billions, billions, and tens of billions.
  • the application needs to write, read or modify its metadata at a high frequency, then the file access client frequently interacts with the metadata. Make the metadata server overwhelmed.
  • the embodiment of the present invention is expected to provide a method for writing a file, reading a file, deleting a file, and querying a file, and a client, so as to reduce the interaction cost between the file access client and the metadata server, and minimize the pressure on the metadata server. .
  • an embodiment of the present invention provides a method for writing a file, which is applied to a file access client, and the method includes: receiving a write request sent by an application, where the write request is used to request data to be written Writing to the target file; obtaining metadata of the target file from the local database, wherein the metadata includes at least fragmentation location information of the target file; and the to-be-written according to the fragmentation location information The data is written to the corresponding data server.
  • the data to be written is written according to the fragmentation location information.
  • the method further includes: sending a write lock request to the remote metadata server, wherein the write lock request is used to request the remote metadata server to write and lock the metadata; A write lock response returned by the remote metadata server, wherein the write lock response carries a timestamp; and the timestamp is saved to the local database.
  • the method further includes: updating the metadata in the local database;
  • the metadata is synchronized to the remote metadata server.
  • the synchronizing the updated metadata to the remote metadata server includes: acquiring, in the process of writing the to-be-written data, the predetermined time length from the local database The updated metadata and synchronized to the remote metadata server; or receiving a shutdown request from the application, obtaining the updated metadata from the local database, and synchronizing to the far End metadata server.
  • the method before the receiving the write request sent by the application, the method further includes: receiving a file creation request sent by the application, wherein the file creation request is used to request to create a file for the application An object file; sending an index node creation request to the directory tree server, wherein the index node creation request is for requesting the directory tree server to create an index node for the target file; receiving and adding a source from the local database The index information of the index node of the directory tree server and the metadata complete the creation of the target file.
  • an embodiment of the present invention provides a method for reading a file, which is applied to a file access client, and the method includes: receiving a read request sent by an application, where the read request is used to request a read target.
  • the data to be read in the file; the metadata of the target file is obtained from the local database, wherein the metadata includes at least the slice location information of the target file; and according to the slice location information, the corresponding Reading the data to be read in the data server; returning the data to be read back to the application.
  • the method before the receiving the read request sent by the application, the method further includes: receiving a read lock request sent by the application, wherein the read lock request is for requesting to read the target file. Returning a read lock success response to the application when the metadata is stored in the local database; acquiring the metadata from a remote metadata server when the metadata is not stored in the local database Thereafter, it is saved in the local database, and the read lock is returned to the application successfully.
  • the method further includes: sending a timestamp of the target file to the remote metadata server, where the timestamp is used
  • the remote metadata server determines whether the metadata is stored in the local database.
  • the method further includes: after receiving the shutdown request sent by the application, notifying the remote metadata server to release the target file.
  • a read lock wherein the close request is for requesting to close the target file.
  • an embodiment of the present invention provides a method for deleting a file, which is applied to a file access client, and the method includes: receiving a delete file request sent by the application; and deleting metadata of the target file in the local database.
  • the method further includes: sending a first delete request to the remote metadata server, where the first delete request is used to indicate the The remote metadata server deletes the metadata; and receives a deletion response sent by the remote metadata server.
  • the method before the sending the first deletion request to the remote metadata server, the method further includes: sending a second deletion request to the directory tree server, where the second deletion request is used to indicate the directory The tree server deletes the index information of the target file.
  • the method further includes: notifying the other file access client that the target file has been deleted.
  • the embodiment of the present invention provides a method for querying a file, which is applied to a file access client, and the method includes: receiving a query request sent by an application, where the query request is used to query metadata of a target file. After the metadata is queried in the local database, the metadata is returned to the application.
  • the method further includes: after the metadata is not queried in the local database, acquiring the metadata from the remote metadata server; The metadata is stored in the local database and the metadata is returned to the application.
  • the method further includes: when the data storage amount of the local database exceeds a phasing threshold, according to a timestamp of the current synchronization of the local database, the timestamp interval with the remote metadata server is greater than The metadata of the preset value is deleted.
  • an embodiment of the present invention provides a file access client, where the file access client includes: a file access module, a local metadata service module, and a local database; wherein the file access module is configured to receive an application. a write request, wherein the write request is used to request that the data to be written is written to the target file; and is further configured to write the data to be written into the corresponding data according to the fragmentation location information of the target file.
  • a local metadata service module configured to obtain metadata of the object file from a local database, wherein the metadata includes at least the slice location information; the local database is configured to store the Metadata.
  • the local metadata service module is further configured to: before the file access module writes the to-be-written data to the data server according to the fragmentation location information, to a remote metadata server. Initiating a write lock request, wherein the write lock request is for requesting the remote metadata server to write lock the metadata; and receiving a write lock response returned by the remote metadata server, wherein the write lock response Carrying a time stamp; saving the time stamp to the book Database.
  • the local metadata service module is further configured to update the local database after the file access module writes the to-be-written data to the data server according to the fragment location information according to the foregoing solution.
  • the metadata ; synchronizing the updated metadata to a remote metadata server.
  • the local metadata service module is configured to acquire the updated metadata from the local database and synchronize with each other by a preset duration in the process of writing the data to be written.
  • the remote metadata server or, receiving a shutdown request from the application, obtaining the updated metadata from the local database, and synchronizing to the remote metadata server.
  • the file access module is further configured to receive a file creation request sent by the application before receiving the write request, wherein the file creation request is used to request to create the file for the application
  • the local metadata service module is further configured to send an index node creation request to the directory tree server, where the index node creation request is used to request the directory tree server to create an index node for the target file; And adding index information of the index node from the directory tree server and the metadata in the local database to complete creation of the target file.
  • the file access module is further configured to receive a read request sent by the application, where the read request is used to request to read data to be read in the target file, and is further configured to: Reading the data back to the application; the local metadata service module is further configured to obtain metadata of the target file from the local database, wherein the metadata includes at least a fragment of the target file Position information; reading the data to be read from the corresponding data server according to the fragmentation location information.
  • the file access module is configured to receive a read lock request sent by the application before receiving a read request sent by the application, wherein the read lock request is Requesting a read lock on the target file; returning a read lock success response to the application when the metadata is stored in the local database; further configured to when the metadata is not stored in the local database Returning the read lock success response to the application after saving the metadata in the local database; the local metadata service module is further configured to: when the metadata is not stored in the In the local database, after the metadata is obtained from the remote metadata server, it is saved in the local database.
  • the local metadata service module is configured to send a timestamp of the target file to the remote metadata server after the file access module receives the read lock request sent by the application, where The timestamp is used by the remote metadata server to determine whether the metadata is stored in the local database.
  • the file accessing module is further configured to: after returning the to-be-read data to the application, receive a shutdown request sent by the application, where the shutdown request is used to request to close the The target file; the local metadata service module is further configured to notify the remote metadata server to release the read lock of the target file.
  • the file accessing module is further configured to receive a delete file request sent by the application;
  • the local metadata service module is further configured to delete metadata of the target file in the local database.
  • the local metadata service module is further configured to: after the file access module receives the delete file request sent by the application, send the first delete request to the remote metadata server, where the A delete request is used to instruct the remote metadata server to delete the metadata; and receive a delete response sent by the remote metadata server.
  • the local metadata service module is further configured to send a second deletion request to the directory tree server before sending the first deletion request to the remote metadata server, where the second deletion request is used Instructing the directory tree server to delete index information of the target file.
  • the local metadata service module is further configured to notify other file access clients that the target file has been deleted after receiving the deletion response sent by the remote metadata server.
  • the file access module is further configured to receive a query request sent by the application, where the query request is used to query metadata of the target file, and is further configured to return the metadata to the application;
  • the local metadata service module is further configured to query the metadata in a local database.
  • the local metadata service module is further configured to: after the file access module receives the query request sent by the application, after the metadata is not queried in the local database, from the remote end
  • the metadata server acquires the metadata; stores the metadata in the local database; and the file access module is further configured to return the metadata to the application.
  • the local metadata service module is further configured to: when the data storage amount of the local database exceeds the phasing threshold, according to the current synchronization timestamp of the local database, and the remote metadata server The metadata with the timestamp interval greater than the preset value is deleted.
  • Another aspect of an embodiment of the present invention is also a computer storage medium having stored therein computer executable instructions for performing at least one of the above methods.
  • the file access client stores the metadata of the application in the local data, so that when the application needs When metadata is used, it can be obtained directly from the local database without frequent interaction with the remote metadata server. This reduces the interaction overhead between the file access client and the metadata server, and minimizes the pressure on the metadata server.
  • FIG. 1 is a schematic structural diagram of a file access client provided in an embodiment of the present invention.
  • FIG. 2 is a schematic flowchart of a method for writing a file according to an embodiment of the present invention
  • FIG. 3 is a schematic flowchart of a method for reading a file according to an embodiment of the present disclosure
  • FIG. 4 is a schematic flowchart of a method for deleting a file according to an embodiment of the present invention.
  • FIG. 5 is a schematic flowchart of a method for querying a file according to an embodiment of the present invention.
  • Embodiments of the present invention provide a method for writing a file, which is applied to a file access client.
  • the file access client may be a data card, a mobile terminal, or the like.
  • FIG. 1 is a schematic structural diagram of a file access client according to an embodiment of the present invention.
  • the file access client includes a file access module 11 , a local metadata service module 12 , and a local database 13 .
  • the file access module 11 is configured to perform data interaction with an application running on the file access client and a plurality of data servers; the local metadata server 12 can interact with the directory tree server, the remote metadata server, and other file access clients. Data interaction is performed; the local database 13 is used to store metadata of the application, and is also configured to perform metadata synchronization with the remote metadata server.
  • Embodiment 1 is a diagrammatic representation of Embodiment 1:
  • FIG. 2 is a schematic flowchart of a method for writing a file according to an embodiment of the present invention. Referring to FIG. 2, the method includes:
  • S201 Receive a write request sent by an application, where the write request is used to request that the request is to be written Data is written to the target file;
  • the method further comprises: sending a write lock request to the remote metadata server, wherein the write lock request is used for the request
  • the remote metadata server writes the lock metadata; receives the write lock response returned by the remote metadata server, wherein the write lock response carries a timestamp; and saves the timestamp to the local database.
  • the local metadata service module initiates a write lock request to the remote metadata server, and the remote metadata server responds to the request, writes the metadata of the lock target file, and returns a timestamp to the local metadata service module, locally.
  • the database saves the timestamp to update the metadata of the target file stored in the local database.
  • the method further includes: receiving a file creation request sent by the application, wherein the file creation request is used to request to create a target for the application. a file; an index node creation request is sent to the directory tree server, wherein the index node creation request is for requesting the directory tree server to create an index node for the file; receiving and adding index information and metadata of the index node from the directory tree server to the local database , complete the creation of the target file.
  • the object file can also be created.
  • the application sends a file creation request to the file access module, and the file access module calls the addfile interface of the local metadata service module to the directory tree server.
  • Requesting to add a new index node then the directory tree server responds to the request, creates a new index node, and sends the index information of the index node to the local metadata service module, and the local metadata service module receives and The index information is saved to the local database, and the metadata of the new file can also be saved.
  • the created file is the object file mentioned in one or more of the above embodiments.
  • the local metadata service module can also obtain a write lock from the remote metadata server.
  • the creation of the file is basically done in the file access client, and the required directory tree
  • the server and the remote metadata server interact to ensure the uniqueness of the index node, and the directory tree server is required to allocate unique index information and a corresponding remote metadata server location.
  • S202 Obtain metadata of the target file from the local database, where the metadata includes at least fragmentation location information of the target file;
  • the file access module responds to the request, requests fragmentation location information from the local metadata service module, and the local metadata module invokes the local database interface to return the fragmentation location information.
  • the metadata may further include information such as a file name, a file size, an access permission, and a data fragment size of the target file, which are not specifically limited by the present invention.
  • S203 Write the data to be written into the corresponding data server according to the fragmentation location information.
  • the application writes the write data to the file access client, and the file access client writes the data to the data server to request that the data to be written be written to the target file.
  • the method further includes: updating the local database. Medium metadata; synchronizes the updated metadata to the remote metadata server.
  • the remote metadata server may further determine whether another file access client opens the target file, and if so, broadcasts the updated metadata after synchronization. Metadata to these files to access the client; if not, only the updated metadata is synchronized.
  • updating the metadata in the local database is updating the local metadata service module serial number, the remote metadata server serial number, and the fragment allocation timer. This data only needs to be obtained in the local metadata service module, no need to go to the remote metadata server to obtain, and reduce interaction with the remote metadata server.
  • the local metadata service module updates the metadata in the local database every time the interval is preset, and obtains the updated metadata from the local database, and synchronizes to the remote metadata server;
  • the updated metadata can also be obtained from the local database and synchronized to the remote metadata server.
  • Embodiment 2 is a diagrammatic representation of Embodiment 1:
  • FIG. 3 is a schematic flowchart of a method for reading a file according to an embodiment of the present invention. Referring to FIG. 3, the method includes:
  • S301 Receive a read request sent by an application, where the read request is used to request to read data to be read in the target file;
  • a read request may be sent to the file access module to request to read the data to be read in the target file.
  • the method further includes: receiving a read lock request sent by the application, wherein the read lock request is used to request the read lock target. File; when the metadata is stored in the local database, the return read lock is successfully answered to the application; when the metadata is not stored in the local database, the metadata is obtained from the remote metadata server, saved in the local database, and returned to read. The lock is successfully answered to the application.
  • the application sends a read lock request to the file access module, and the file access module responds to the request, and invokes an open function of the local metadata service module. If the metadata of the target file is stored in the local database, the record is taken out. Timestamp, then, the local metadata service module sends a read lock request carrying the above timestamp to the remote metadata server, and the remote metadata server responds to the read lock request to determine the timestamp sent by the local metadata service module and its own record. Whether the timestamps are equal, if so, it indicates that the metadata of the target file is stored in the local database. At this time, the read lock is successfully answered; if not, the target is not stored in the local database. Metadata of the file. At this time, the metadata of the target file is sent to the local metadata service module and the read lock is successfully answered. Then, the local metadata service module stores the acquired metadata in the local database, and then uses it later, and A read lock is successfully returned to the application.
  • the file access module responds to the request, requests fragmentation location information from the local metadata service module, and the local metadata module invokes the local database interface to return the fragmentation location information.
  • the file access module extracts the data to be read from the corresponding data server according to the fragmentation location information, and returns the data to the application.
  • the file access module may also send a close request to request to close the target file, and the file access module responds to the request, and calls the local metadata service module's Close function to close the target. File, and notify the remote metadata server to release the read lock of the target file, wherein the close request is used to request to close the target file.
  • Embodiment 3 is a diagrammatic representation of Embodiment 3
  • FIG. 4 is a schematic flowchart of a method for deleting a file according to an embodiment of the present invention. Referring to FIG. 4, the method includes:
  • the file access module may be sent a delete file request.
  • the file access module responds to the request by calling the local metadata service module, which will Metadata deletion of the target file in the local database.
  • the local metadata service module may further send a first deletion request to the remote metadata server, where the first deletion request is used to instruct the remote metadata server to delete the metadata; and the remote metadata is received.
  • the delete response sent by the server may be further sent.
  • the remote metadata server responds to the request, deletes the metadata of the object file stored by itself, and notifies the corresponding data server to delete the fragment.
  • the data will also inform the data server to delete the target file, and finally, delete the response to the local metadata service module.
  • the local metadata service module may further send a second deletion request to the directory tree server, where the second deletion request is used to instruct the directory tree server to delete the index information of the target file.
  • the local metadata server sends a second deletion request to the directory tree server, and the directory tree server responds to the request and deletes the index information of the object file stored by itself.
  • the local metadata service module may also notify other file access clients that the target file has been deleted.
  • Embodiment 4 is a diagrammatic representation of Embodiment 4:
  • FIG. 5 is a schematic flowchart of a method for querying a file according to an embodiment of the present invention. Referring to FIG. 5, the method includes:
  • S501 Receive a query request sent by an application, where the query request is used to query metadata of the target file;
  • the query request may be sent to the file access module.
  • the file access module responds to the request by calling the local metadata service module. Whether the query exists in the local database, if it exists, directly returns the metadata to the application; if it does not exist, after the metadata is not queried in the local database, the metadata is obtained from the remote metadata server, and then, will come from The metadata of the remote metadata server is stored in the local database and returns metadata to the application.
  • the timestamp in the remote metadata server will be based on the timestamp of the current synchronization of the local database. Metadata deletion with an interval greater than the preset value.
  • the local metadata service module determines the metadata that needs to be retrieved by the remote metadata server, and then the file access client is idle.
  • the remote metadata server can be synchronized in the background. For example, when the file access client is idle, the local metadata service module traverses all the metadata in the local database, and the index information and time stamp of the metadata that needs to be reacquired. Packaged to the remote metadata server for comparison. If the timestamps are consistent, the remote metadata server returns a data-consistent response; if it is inconsistent, it waits for the next application to trigger an update.
  • the file access client stores the metadata of the application in the local data, so that when the application needs to use the metadata, it can be directly obtained from the local database without frequent interaction with the remote metadata server. In this way, the interaction overhead between the file access client and the metadata server is reduced, and the pressure on the metadata server is minimized.
  • the embodiment of the present invention further provides a file access client, which is consistent with the file access client described in one or more embodiments.
  • the file access client includes: a file access module 11, a local metadata service module 12, and a local database 13; wherein the file access module 11 is configured to receive a write request sent by an application, wherein the write request It is used to request that the data to be written is written into the target file; and is also used to write the data to be written into the corresponding data according to the fragmentation location information of the target file.
  • the local metadata service module 12 is configured to obtain metadata of the target file from the local database 13, wherein the metadata includes at least fragmentation location information, and the local database 13 is configured to store the metadata.
  • the local metadata service module 12 is further configured to send a write lock request to the remote metadata server before the file access module 11 writes the data to be written to the data server according to the fragmentation location information, where
  • the lock request is used to request the remote metadata server to write the lock metadata;
  • the write lock response returned by the remote metadata server is received, wherein the write lock response carries a timestamp; and the time stamp is saved to the local database 13.
  • the local metadata service module 12 is further configured to update the metadata in the local database 13 after the file access module 11 writes the data to be written to the data server according to the fragmentation location information; the updated metadata Synchronize to the remote metadata server.
  • the local metadata service module 12 is configured to obtain updated metadata from the local database 13 and synchronize to the remote metadata server every predetermined time interval during the process of writing the data to be written. Or, receive a shutdown request from the application, retrieve the updated metadata from the local database 13, and synchronize to the remote metadata server.
  • the file accessing module 11 is further configured to receive a file creation request sent by the application before receiving the write request, where the file creation request is used to request to create a target file for the application;
  • the local metadata service module 12 is further configured to send an index node creation request to the directory tree server, wherein the index node creation request is for requesting the directory tree server to create an index node for the target file; receiving and adding the directory tree from the local database 13 The index information of the index node of the server and the metadata complete the creation of the target file.
  • the file accessing module 11 is further configured to receive a read request sent by the application, where the read request is used to request to read the data to be read in the target file; and is further configured to return the data to be read to the application.
  • the local metadata service module 12 is further configured to obtain metadata of the target file from the local database 13, wherein the metadata includes at least fragmentation location information of the target file; and read from the corresponding data server according to the fragmentation location information. The data to be read.
  • the file access module 11 is configured to receive a read lock request sent by the application before receiving the read request sent by the application, wherein the read lock request is used to request the read lock target file; when the metadata is stored locally When the database is returned, the read lock is successfully replied to the application; when the metadata is not stored in the local database, the metadata is saved in the local database, and the read lock is successfully returned to the application; the local metadata service module, It is also configured to save the metadata in the local database after the metadata is obtained from the remote metadata server when the metadata is not stored in the local database.
  • the local metadata service module 12 is configured to send a timestamp of the target file to the remote metadata server after the file access module 11 receives the read lock request sent by the application, where the timestamp is used for the remote end.
  • the metadata server determines whether the metadata is stored in the local database 13.
  • the file accessing module 11 is further configured to receive a shutdown request sent by the application after returning the data to be read to the application, wherein the shutdown request is used to request to close the target file; the local metadata service module 12, A read lock configured to notify the remote metadata server to release the target file.
  • the file accessing module 11 is further configured to receive a delete file request sent by the application; the local metadata service module 12 is further configured to delete the metadata of the target file in the local database 13.
  • the local metadata service module 12 is further configured to send a first deletion request to the remote metadata server after the file access module 11 receives the delete file request sent by the application, where the first deletion request is used to indicate The remote metadata server deletes the metadata; receives the delete response sent by the remote metadata server.
  • the local metadata service module 12 is further configured to send a second deletion request to the directory tree server before sending the first deletion request to the remote metadata server, wherein the second deletion request is used to indicate the directory tree server Delete the index information of the target file.
  • the local metadata service module 12 is further configured to notify other file access clients that the target file has been deleted after receiving the deletion response sent by the remote metadata server.
  • the file accessing module 11 is further configured to receive a query request sent by the application, wherein the query request is used to query metadata of the target file; and is further configured to return metadata to the application; the local metadata service module 12, It is also configured to query metadata in the local database 13.
  • the local metadata service module 12 is further configured to: after the file access module 11 receives the query request sent by the application, after the metadata is not queried in the local database 13, the metadata is obtained from the remote metadata server; The metadata is stored in the local database 13; the file access module 11 is also configured to return metadata to the application.
  • the local metadata service module 12 is further configured to: when the data storage amount of the local database 13 exceeds the elimination threshold, according to the timestamp of the current synchronization of the local database 13, the timestamp in the remote metadata server Metadata deletion with an interval greater than the preset value.
  • the embodiment of the present invention further provides a computer storage medium, where the computer storage medium stores computer executable instructions, and the computer executable instructions are used to execute at least one of the foregoing methods; specifically, as shown in FIG. 2 and FIG. And at least one of the methods shown in FIG.
  • the computer storage medium described in this embodiment may include a mobile storage device, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, and the like. Medium.
  • the computer storage medium is a non-transitory storage medium such as a ROM.
  • embodiments of the present invention can be provided as a method, system, or computer program product. Accordingly, the present invention may employ hardware embodiments, software embodiments, or junctions. In the form of an embodiment of the software and hardware aspects. Moreover, the invention can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage and optical storage, etc.) including computer usable program code.
  • the computer program instructions can also be stored in a computer readable memory that can direct a computer or other programmable data processing device to operate in a particular manner, such that the instructions stored in the computer readable memory produce an article of manufacture comprising the instruction device.
  • the apparatus implements the functions specified in one or more blocks of a flow or a flow and/or block diagram of the flowchart.
  • These computer program instructions can also be loaded onto a computer or other programmable data processing device such that a series of operational steps are performed on a computer or other programmable device to produce computer-implemented processing for execution on a computer or other programmable device.
  • the instructions provide steps for implementing the functions specified in one or more of the flow or in a block or blocks of a flow diagram.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

本发明实施例公开了一种写文件的方法,应用于文件访问客户端,所述方法包括:接收应用程序发送的写请求,其中,所述写请求用于请求将待写入数据写入目标文件;从本地数据库中获得所述目标文件的元数据,其中,所述元数据至少包括所述目标文件的分片位置信息;根据所述分片位置信息,将所述待写入数据写入对应的数据服务器。本发明实施例同时还提供一种读文件、删除文件、查询文件的方法及设备。本发明实施例还提供了一种计算机存储介质。

Description

写、读、删除、查询文件的方法、客户端和存储介质 技术领域
本发明涉及分布式文件系统领域,尤其涉及写文件、读文件、删除文件、查询文件的方法及客户端和计算机存储介质。
背景技术
随着分布式文件系统的广泛应用,文件量级也从千万级别,快速上升至亿、十亿、百亿级别。在文件量如此巨大,特别是小文件数量日益增多的情况下,应用程序需要高频地写入、读取或者修改其元数据,那么,就是的文件访问客户端频繁地与元数据进行交互,令元数据服务器不堪重负。
但是,在现有技术中并不存在一种合理的减轻元数据服务器压力的技术方案。
发明内容
有鉴于此,本发明实施例期望提供写文件、读文件、删除文件、查询文件的方法及客户端,以减少文件访问客户端与元数据服务器的交互开销,最大程度的减轻元数据服务器的压力。
本发明实施例的技术方案是这样实现的:
第一方面,本发明实施例提供一种写文件的方法,应用于文件访问客户端,所述方法包括:接收应用程序发送的写请求,其中,所述写请求用于请求将待写入数据写入目标文件;从本地数据库中获得所述目标文件的元数据,其中,所述元数据至少包括所述目标文件的分片位置信息;根据所述分片位置信息,将所述待写入数据写入对应的数据服务器。
基于上述方案,在所述根据所述分片位置信息,将所述待写入数据写 入对应的数据服务器之前,所述方法还包括:向远端元数据服务器发送写锁请求,其中,所述写锁请求用于请求所述远端元数据服务器写锁所述元数据;接收所述远端元数据服务器返回的写锁应答,其中,所述写锁应答中携带有时间戳;将所述时间戳保存至所述本地数据库。
基于上述方案,在所述根据所述分片位置信息,将所述待写入数据写入对应的数据服务器之后,所述方法还包括:更新所述本地数据库中所述元数据;将更新后的元数据同步至远端元数据服务器。
基于上述方案,所述将更新后的元数据同步至远端元数据服务器,包括:在写入所述待写入数据的过程中,每间隔预设时长,从所述本地数据库中获取所述更新后的元数据,并同步至所述远端元数据服务器;或,接收来自所述应用程序的关闭请求,从所述本地数据库中获取所述更新后的元数据,并同步至所述远端元数据服务器。
基于上述方案,在所述接收应用程序发送的写请求之前,所述方法还包括:接收所述应用程序发送的文件创建请求,其中,所述文件创建请求用于请求为所述应用程序创建所述目标文件;向目录树服务器发送索引节点创建请求,其中,所述索引节点创建请求用于请求所述目录树服务器为所述目标文件创建索引节点;接收并在所述本地数据库中添加来自所述目录树服务器的所述索引节点的索引信息以及所述元数据,完成所述目标文件的创建。
第二方面,本发明实施例提供一种读文件的方法,应用于文件访问客户端,所述方法包括:接收应用程序发送的读取请求,其中,所述读取请求用于请求读取目标文件中的待读取数据;从本地数据库中获得所述目标文件的元数据,其中,所述元数据至少包括所述目标文件的分片位置信息;根据所述分片位置信息,从对应的数据服务器中读取所述待读取数据;将所述待读取数据返回所述应用程序。
基于上述方案,在所述接收应用程序发送的读取请求之前,所述方法还包括:接收所述应用程序发送的读锁请求,其中,所述读锁请求用于请求读锁所述目标文件;当所述元数据存储在所述本地数据库时,返回读锁成功应答给所述应用程序;当所述元数据没有存储在所述本地数据库时,从远端元数据服务器获取所述元数据后,保存在所述本地数据库中,并返回所述读锁成功应答给所述应用程序。
基于上述方案,在所述接收所述应用程序发送的读锁请求之后,所述方法还包括:向所述远端元数据服务器发送所述目标文件的时间戳,其中,所述时间戳用于所述远端元数据服务器确定所述元数据是否存储于所述本地数据库。
基于上述方案,在所述将所述待读取数据返回所述应用程序之后,所述方法还包括:接收所述应用程序发送的关闭请求后,通知远端元数据服务器释放所述目标文件的读锁,其中,所述关闭请求用于请求关闭所述目标文件。
第三方面,本发明实施例提供一种删除文件的方法,应用于文件访问客户端,所述方法包括:接收所述应用程序发送的删除文件请求;删除本地数据库中的目标文件的元数据。
基于上述方案,在所述接收所述应用程序发送的删除文件请求之后,所述方法还包括:向远端元数据服务器发送第一删除请求,其中,所述第一删除请求用于指示所述远端元数据服务器删除所述元数据;接收所述远端元数据服务器发送的删除应答。
基于上述方案,在所述向远端元数据服务器发送第一删除请求之前,所述方法还包括:向目录树服务器发送第二删除请求,其中,所述第二删除请求用于指示所述目录树服务器删除所述目标文件的索引信息。
基于上述方案,在所述接收所述远端元数据服务器发送的删除应答之 后,所述方法还包括:向其它文件访问客户端通知所述目标文件已删除。
第四方面,本发明实施例提供一种查询文件的方法,应用于文件访问客户端,所述方法包括:接收应用程序发送的查询请求,其中,所述查询请求用于查询目标文件的元数据;在本地数据库中查询到所述元数据后,返回所述元数据给所述应用程序。
基于上述方案,所述接收应用程序发送的查询请求之后,所述方法还包括:在所述本地数据库中未查询到所述元数据后,从远端元数据服务器获取所述元数据;将所述元数据存储于所述本地数据库,并返回所述元数据给所述应用程序。
基于上述方案,所述方法还包括:当所述本地数据库的数据存储量超过淘汰门限值时,根据所述本地数据库当前同步的时间戳,将与远端元数据服务器中的时间戳间隔大于预设值的元数据删除。
第五方面,本发明实施例提供一种文件访问客户端,所述文件访问客户端包括:文件访问模块、本地元数据服务模块以及本地数据库;其中,所述文件访问模块,配置为接收应用程序发送的写请求,其中,所述写请求用于请求将待写入数据写入目标文件;还配置为根据所述目标文件的分片位置信息,将所述待写入数据写入对应的数据服务器;所述本地元数据服务模块,配置为从本地数据库中获得所述目标文件的元数据,其中,所述元数据至少包括所述分片位置信息;所述本地数据库,用于存储所述元数据。
基于上述方案,所述本地元数据服务模块,还配置为在所述文件访问模块根据所述分片位置信息,将所述待写入数据写入所述数据服务器之前,向远端元数据服务器发起写锁请求,其中,所述写锁请求用于请求所述远端元数据服务器写锁所述元数据;接收所述远端元数据服务器返回的写锁应答,其中,所述写锁应答中携带有时问戳;将所述时间戳保存至所述本 地数据库。
基于上述方案,所述本地元数据服务模块,还配置为在所述文件访问模块根据所述分片位置信息,将所述待写入数据写入所述数据服务器之后,更新所述本地数据库中所述元数据;将更新后的元数据同步至远端元数据服务器。
基于上述方案,所述本地元数据服务模块,配置为在写入所述待写入数据的过程中,每间隔预设时长,从所述本地数据库中获取所述更新后的元数据,并同步至所述远端元数据服务器;或,接收来自所述应用程序的关闭请求,从所述本地数据库中获取所述更新后的元数据,并同步至所述远端元数据服务器。
基于上述方案,所述文件访问模块,还配置为在接收所述写请求之前,接收所述应用程序发送的文件创建请求,其中,所述文件创建请求用于请求为所述应用程序创建所述目标文件;所述本地元数据服务模块,还用于向目录树服务器发送索引节点创建请求,其中,所述索引节点创建请求用于请求所述目录树服务器为所述目标文件创建索引节点;接收并在所述本地数据库中添加来自所述目录树服务器的所述索引节点的索引信息以及所述元数据,完成所述目标文件的创建。
基于上述方案,所述文件访问模块,还配置为接收应用程序发送的读取请求,其中,所述读取请求用于请求读取目标文件中的待读取数据;还配置为将所述待读取数据返回所述应用程序;所述本地元数据服务模块,还用于从所述本地数据库中获得所述目标文件的元数据,其中,所述元数据至少包括所述目标文件的分片位置信息;根据所述分片位置信息,从对应的数据服务器中读取所述待读取数据。
基于上述方案,所述文件访问模块,配置为在接收应用程序发送的读取请求之前,接收所述应用程序发送的读锁请求,其中,所述读锁请求用 于请求对所述目标文件进行读锁;当所述元数据存储在所述本地数据库时,返回读锁成功应答给所述应用程序;还配置为当所述元数据没有存储在所述本地数据库时,将所述元数据保存在所述本地数据库中之后,返回所述读锁成功应答给所述应用程序;所述本地元数据服务模块,还配置为当所述元数据没有存储在所述本地数据库时,从远端元数据服务器获取所述元数据后,保存在所述本地数据库中。
基于上述方案,所述本地元数据服务模块,配置为在所述文件访问模块接收所述应用程序发送的读锁请求之后,向所述远端元数据服务器发送所述目标文件的时间戳,其中,所述时间戳用于所述远端元数据服务器确定所述元数据是否存储于所述本地数据库。
基于上述方案,所述文件访问模块,还配置为在将所述待读取数据返回所述应用程序之后,接收所述应用程序发送的关闭请求,其中,所述关闭请求用于请求关闭所述目标文件;所述本地元数据服务模块,还配置为通知远端元数据服务器释放所述目标文件的读锁。
基于上述方案,所述文件访问模块,还配置为接收所述应用程序发送的删除文件请求;所述本地元数据服务模块,还用于删除本地数据库中的目标文件的元数据。
基于上述方案,所述本地元数据服务模块,还配置为在所述文件访问模块接收所述应用程序发送的删除文件请求之后,向远端元数据服务器发送第一删除请求,其中,所述第一删除请求用于指示所述远端元数据服务器删除所述元数据;接收所述远端元数据服务器发送的删除应答。
基于上述方案,所述本地元数据服务模块,还配置为在向所述远端元数据服务器发送第一删除请求之前,向目录树服务器发送第二删除请求,其中,所述第二删除请求用于指示所述目录树服务器删除所述目标文件的索引信息。
基于上述方案,所述本地元数据服务模块,还配置为在接收所述远端元数据服务器发送的删除应答之后,向其它文件访问客户端通知所述目标文件已删除。
基于上述方案,所述文件访问模块,还配置为接收应用程序发送的查询请求,其中,所述查询请求用于查询目标文件的元数据;还用于返回所述元数据给所述应用程序;所述本地元数据服务模块,还用于在本地数据库中查询所述元数据。
基于上述方案,所述本地元数据服务模块,还配置为在所述文件访问模块接收所述应用程序发送的查询请求之后,在所述本地数据库中未查询到所述元数据后,从远端元数据服务器获取所述元数据;将所述元数据存储于所述本地数据库;所述文件访问模块,还用于返回所述元数据给所述应用程序。
基于上述方案,所述本地元数据服务模块,还配置为当所述本地数据库的数据存储量超过淘汰门限值时,根据所述本地数据库当前同步的时间戳,将与远端元数据服务器中的时间戳间隔大于预设值的元数据删除。
本发明实施例另一方面还一种计算机存储介质,所述计算机存储介质中存储有计算机可执行指令,所述计算机可执行指令用于执行上述方法的至少其中之一。
采用本发明实施例所提供的写文件、读文件、删除文件、查询文件的方法及客户端和计算机存储介质,文件访问客户端在本地数据中存储应用程序的元数据,这样,当应用程序需要使用元数据的时候,就可以直接从本地数据库中获取,无需与远端元数据服务器频繁交互,如此,减少文件访问客户端与元数据服务器的交互开销,最大程度的减轻元数据服务器的压力。
附图说明
图1为本发明实施例中提供的文件访问客户端的结构示意图;
图2为本发明实施例中提供的写文件的方法流程示意图;
图3为本发明实施例中提供的读文件的方法流程示意图;
图4为本发明实施例中提供的删除文件的方法流程示意图;
图5为本发明实施例中提供的查询文件的方法流程示意图。
具体实施方式
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,应当理解,以下所说明的优选实施例仅用于说明和解释本发明,并不用于限定本发明。
本发明实施例提供一种写文件的方法,该方法应用于文件访问客户端。在实际应用中,该文件访问客户端可以为数据卡、移动终端等。
图1为本发明实施例中的文件访问客户端的结构示意图,参见图1所示,该文件访问客户端包括:文件访问模块11、本地元数据服务模块12及本地数据库13。
其中,文件访问模块11配置为与在文件访问客户端上运行的应用程序以及多个数据服务器进行数据交互;本地元数据服务器12可以与目录树服务器、远端元数据服务器以及其它文件访问客户端进行数据交互;本地数据库13用于存储应用程序的元数据,还配置为与远端元数据服务器进行元数据同步。
下面结合本发明实施例对上述文件客户端的工作过程进行说明。
实施例一:
图2为本发明实施例中的写文件的方法流程示意图,参见图2所示,该方法包括:
S201:接收应用程序发送的写请求,其中,写请求用于请求将待写入 数据写入目标文件;
在另一实施例中,为了使得该文件访问客户端具有写文件的权限,那么,在S201之前,该方法还包括:向远端元数据服务器发送写锁请求,其中,写锁请求用于请求远端元数据服务器写锁元数据;接收远端元数据服务器返回的写锁应答,其中,写锁应答中携带有时间戳;将时间戳保存至本地数据库。
具体来说,本地元数据服务模块向远端元数据服务器发起写锁请求,远端元数据服务器响应该请求,写锁目标文件的元数据,并返回一时间戳给本地元数据服务模块,本地数据库保存该时间戳,以更新目标文件存储在本地数据库中的元数据。
基于上述方案,在文件访问客户端获得写锁之前,还需要先创建目标文件,那么,该方法还包括:接收应用程序发送的文件创建请求,其中,文件创建请求用于请求为应用程序创建目标文件;向目录树服务器发送索引节点创建请求,其中,索引节点创建请求用于请求目录树服务器为文件创建索引节点;接收并在本地数据库中添加来自目录树服务器的索引节点的索引信息以及元数据,完成目标文件的创建。
具体来说,在写文件之前,还可以创建目标文件,此时,应用程序向文件访问模块发送创建文件请求,文件访问模块调用本地元数据服务模块的添加文件(addfile)接口,向目录树服务器请求增加一个新的索引节点,然后,目录树服务器响应该请求,创建一新的索引节点,并将该索引节点的索引信息发送给本地元数据服务模块,本地元数据服务模块接收,并将该索引信息保存至本地数据库,同时还可以保存新文件的元数据,此时,创建出来的文件就是上述一个或者多个实施例中所说的目标文件。接下来,本地元数据服务模块还可以向远端元数据服务器获取写锁。
如此,文件的创建基本在文件访问客户端完成,期间需要的与目录树 服务器及远端元数据服务器交互是为保证索引节点的唯一性,需要目录树服务器分配唯一索引信息和对应的远端元数据服务器位置。
S202:从本地数据库中获得目标文件的元数据,其中,元数据至少包括目标文件的分片位置信息;
具体来说,应用程序向文件访问模块发送写请求之后,文件访问模块响应该请求,向本地元数据服务模块请求分片位置信息,本地元数据模块调用本地数据库接口返回分片位置信息。
在实际应用中,元数据还可以包括目标文件的文件名称,文件大小,访问权限、数据分片大小等信息,本发明不做具体限定。
S203:根据分片位置信息,将待写入数据写入对应的数据服务器。
具体来说,应用程序将写入数据写入文件访问客户端,文件访问客户端将数据写入数据服务器以请求将待写入数据写入目标文件。
基于上述方案,在S203之后,由于目标文件中写入了新的数据,本地元数据服务模块就需要对本地数据库中存储的目标文件的元数据进行更新,那么,该方法还包括:更新本地数据库中元数据;将更新后的元数据同步至远端元数据服务器。
基于上述方案,远端元数据服务器在收到更新后的元数据之后,还可以判断是否有其它文件访问客户端打开该目标文件,如果有,则在同步更新后的元数据的同时广播更新后的元数据到这些文件访问客户端上;如果没有,则仅同步更新后的元数据。
需要说明的是,更新本地数据库中的元数据是更新本地元数据服务模块序号、远端元数据服务器序号以及分片分配计时器。这些数据只需要在本地元数据服务模块即可获取,不需要到再到远端元数据服务器获取,减少与远端元数据服务器交互。
在具体实施过程中,有些文件写入耗时较长,那么,此时,就需要在 写入待写入数据的过程中,本地元数据服务模块每间隔预设时长,更新一次本地数据库中的元数据,并从本地数据库中获取更新后的元数据,同步至远端元数据服务器;当然,也可以在接收来自应用程序的关闭请求之后,从本地数据库中获取更新后的元数据,并同步至远端元数据服务器。
至此,就完成了写文件的流程。
实施例二:
图3为本发明实施例中的读文件的方法流程示意图,参见图3所示,该方法包括:
S301:接收应用程序发送的读取请求,其中,读取请求用于请求读取目标文件中的待读取数据;
具体来说,当应用程序需要读取目标文件中的某一部分数据时,可以向文件访问模块发送读取请求,请求读取目标文件中的待读取数据。
基于上述方案,在读文件之前,文件访问客户端需要获得读文件的权限,所以,在S301之前,该方法还包括:接收应用程序发送的读锁请求,其中,读锁请求用于请求读锁目标文件;当元数据存储在本地数据库时,返回读锁成功应答给应用程序;当元数据没有存储在本地数据库时,从远端元数据服务器获取元数据后,保存在本地数据库中,并返回读锁成功应答给应用程序。
具体来说,应用程序向文件访问模块发送读锁请求,文件访问模块响应该请求,调用本地元数据服务模块的打开(Open)函数,如果本地数据库中存储有目标文件的元数据,取出记录的时间戳,然后,本地元数据服务模块向远端元数据服务器发送携带上述时间戳的读锁请求,远端元数据服务器响应读锁请求,判断本地元数据服务模块发来的时间戳和自身记录的时间戳是否相等,若是,则表明在本地数据库中存储有目标文件的元数据,此时,直接应答读锁成功;若否,则表明在本地数据库中未存储目标 文件的元数据,此时,将目标文件的元数据发送给本地元数据服务模块及读锁成功应答,然后,本地元数据服务模块将获取的元数据存储在本地数据库中,以后后续使用,并向应用程序返回读锁成功应答。
S302:从本地数据库中获得目标文件的元数据,其中,元数据至少包括目标文件的分片位置信息;
具体来说,应用程序向文件访问模块发送读请求之后,文件访问模块响应该请求,向本地元数据服务模块请求分片位置信息,本地元数据模块调用本地数据库接口返回分片位置信息。
S303:根据分片位置信息,从对应的数据服务器中读取待读取数据;
S304:将待读取数据返回应用程序。
具体来说,文件访问模块根据分片位置信息,从对应的数据服务器中,将待读取数据取出,并返回给应用程序。
基于上述方案,在应用程序读完文件之后,还可以向文件访问模块发送关闭请求,以请求关闭目标文件,文件访问模块响应该请求,调用本地元数据服务模块的关闭(Close)函数,关闭目标文件,并通知远端元数据服务器释放目标文件的读锁,其中,关闭请求用于请求关闭目标文件。
至此,就完成了读文件的流程。
实施例三:
图4为本发明实施例中的删除文件的方法流程示意图,参见图4所示,该方法包括:
S401:接收应用程序发送的删除文件请求;
具体来说,当应用程序需要删除目标文件时,可以向文件访问模块发删除文件请求。
S402:删除本地数据库中的目标文件的元数据。
具体来说,文件访问模块响应该请求,调用本地元数据服务模块,将 本地数据库中的目标文件的元数据删除。
基于上述方案,在S402之后,本地元数据服务模块还可以向远端元数据服务器发送第一删除请求,其中,第一删除请求用于指示远端元数据服务器删除元数据;接收远端元数据服务器发送的删除应答。
具体来说,本地元数据服务模块向远端元数据服务器发送第一删除请求之后,远端元数据服务器响应该请求,删除自身存储的目标文件的元数据,并通知对应的数据服务器删除分片数据,也就会通知数据服务器删除目标文件,最后,对本地元数据服务模块进行删除应答。
基于上述方案,在S402之后,本地元数据服务模块还可以向目录树服务器发送第二删除请求,其中,第二删除请求用于指示目录树服务器删除目标文件的索引信息。
具体来说,本地元数据服务器向目录树服务器发送第二删除请求,目录树服务器响应该请求,删除自身存储的目标文件的索引信息。
在实际应用中,在目标文件删除之后,本地元数据服务模块还可以向其它文件访问客户端通知目标文件已删除。
至此,就完成了删除文件的流程。
实施例四:
图5为本发明实施例中的查询文件的方法流程示意图,参见图5所示,该方法包括:
S501:接收应用程序发送的查询请求,其中,查询请求用于查询目标文件的元数据;
具体来说,当应用程序需要查询目标文件的元数据时,可以向文件访问模块发送查询请求。
S502:在本地数据库中查询到元数据后,返回元数据给应用程序。
具体来说,文件访问模块响应该请求,调用本地元数据服务模块,在 本地数据库中查询是否存在,如果存在,则直接返回元数据给应用程序;若果不存在,则在本地数据库中未查询到元数据后,从远端元数据服务器获取元数据,然后,将来自远端元数据服务器的元数据存储于本地数据库,并返回元数据给应用程序。
在实际应用中,由于本地数据库的数据存储量有限,那么,当本地数据库的数据存储量超过淘汰门限值时,根据本地数据库当前同步的时间戳,将与远端元数据服务器中的时间戳间隔大于预设值的元数据删除。
在另一实施例中,在文件访问客户端重启后,当本地数据库上电时,本地元数据服务模块确定出需要到远端元数据服务器重新获取的元数据,那么,在文件访问客户端空闲时,可以在后台与远端元数据服务器进行同步,比如,文件访问客户端空闲时,本地元数据服务模块遍历本地数据库中的所有元数据,把需要重新获取的元数据的索引信息及时间戳打包到远端元数据服务器上进行比较,若时间戳一致,远端元数据服务器则返回数据一致应答;若不一致,则等待下一次应用程序触发更新。
至此,就完成了查询文件的流程。
由上述可知,文件访问客户端在本地数据中存储应用程序的元数据,这样,当应用程序需要使用元数据的时候,就可以直接从本地数据库中获取,无需与远端元数据服务器频繁交互,如此,减少文件访问客户端与元数据服务器的交互开销,最大程度的减轻元数据服务器的压力。
基于同一发明构思,本发明实施例还提供一种文件访问客户端,该文件访问客户端与上述一个或者多个实施例中所述的文件访问客户端一致。
参见图1所示,该文件访问客户端包括:文件访问模块11、本地元数据服务模块12以及本地数据库13;其中,文件访问模块11,配置为接收应用程序发送的写请求,其中,写请求用于请求将待写入数据写入目标文件;还用于根据目标文件的分片位置信息,将待写入数据写入对应的数据 服务器;本地元数据服务模块12,用于从本地数据库13中获得目标文件的元数据,其中,元数据至少包括分片位置信息;本地数据库13,用于存储元数据。
基于上述方案,本地元数据服务模块12,还配置为在文件访问模块11根据分片位置信息,将待写入数据写入数据服务器之前,向远端元数据服务器发送写锁请求,其中,写锁请求用于请求远端元数据服务器写锁元数据;接收远端元数据服务器返回的写锁应答,其中,写锁应答中携带有时间戳;将时间戳保存至本地数据库13。
基于上述方案,本地元数据服务模块12,还配置为在文件访问模块11根据分片位置信息,将待写入数据写入数据服务器之后,更新本地数据库13中元数据;将更新后的元数据同步至远端元数据服务器。
基于上述方案,本地元数据服务模块12,配置为在写入待写入数据的过程中,每间隔预设时长,从本地数据库13中获取更新后的元数据,并同步至远端元数据服务器;或,接收来自应用程序的关闭请求,从本地数据库13中获取更新后的元数据,并同步至远端元数据服务器。
基于上述方案,文件访问模块11,还配置为在接收写请求之前,接收应用程序发送的文件创建请求,其中,文件创建请求用于请求为应用程序创建目标文件;
本地元数据服务模块12,还配置为向目录树服务器发送索引节点创建请求,其中,索引节点创建请求用于请求目录树服务器为目标文件创建索引节点;接收并在本地数据库13中添加来自目录树服务器的索引节点的索引信息以及元数据,完成目标文件的创建。
基于上述方案,文件访问模块11,还配置为接收应用程序发送的读取请求,其中,读取请求用于请求读取目标文件中的待读取数据;还配置为将待读取数据返回应用程序;
本地元数据服务模块12,还用于从本地数据库13中获得目标文件的元数据,其中,元数据至少包括目标文件的分片位置信息;根据分片位置信息,从对应的数据服务器中读取所述待读取数据。
基于上述方案,文件访问模块11,配置为在接收应用程序发送的读取请求之前,接收应用程序发送的读锁请求,其中,读锁请求用于请求读锁目标文件;当元数据存储在本地数据库时,返回读锁成功应答给应用程序;还配置为当元数据没有存储在本地数据库时,将元数据保存在本地数据库中之后,返回读锁成功应答给应用程序;本地元数据服务模块,还配置为当元数据没有存储在本地数据库时,从远端元数据服务器获取元数据后,保存在本地数据库中。
基于上述方案,本地元数据服务模块12,配置为于在文件访问模块11接收应用程序发送的读锁请求之后,向远端元数据服务器发送目标文件的时间戳,其中,时间戳用于远端元数据服务器确定元数据是否存储于本地数据库13。
基于上述方案,文件访问模块11,还配置为在将待读取数据返回应用程序之后,接收应用程序发送的关闭请求,其中,关闭请求用于请求关闭目标文件;本地元数据服务模块12,还配置为通知远端元数据服务器释放目标文件的读锁。
基于上述方案,文件访问模块11,还配置为接收应用程序发送的删除文件请求;本地元数据服务模块12,还用于删除本地数据库13中的目标文件的元数据。
基于上述方案,本地元数据服务模块12,还配置为在文件访问模块11接收应用程序发送的删除文件请求之后,向远端元数据服务器发送第一删除请求,其中,第一删除请求用于指示远端元数据服务器删除元数据;接收远端元数据服务器发送的删除应答。
基于上述方案,本地元数据服务模块12,还配置为在向远端元数据服务器发送第一删除请求之前,向目录树服务器发送第二删除请求,其中,第二删除请求用于指示目录树服务器删除目标文件的索引信息。
基于上述方案,本地元数据服务模块12,还配置为在接收远端元数据服务器发送的删除应答之后,向其它文件访问客户端通知目标文件已删除。
基于上述方案,文件访问模块11,还配置为接收应用程序发送的查询请求,其中,查询请求用于查询目标文件的元数据;还用于返回元数据给应用程序;本地元数据服务模块12,还配置为在本地数据库13中查询元数据。
基于上述方案,本地元数据服务模块12,还配置为在文件访问模块11接收应用程序发送的查询请求之后,在本地数据库13中未查询到元数据后,从远端元数据服务器获取元数据;将元数据存储于本地数据库13;文件访问模块11,还配置为返回元数据给应用程序。
基于上述方案,本地元数据服务模块12,还配置为当本地数据库13的数据存储量超过淘汰门限值时,根据本地数据库13当前同步的时间戳,将与远端元数据服务器中的时间戳间隔大于预设值的元数据删除。
本发明实施例还提供了一种计算机存储介质,所述计算机存储介质中存储有计算机可执行指令,所述计算机可执行指令用于执行前述方法的至少其中之一;具体如图2、图3及图5中所示方法的至少其中之一。本实施例所述的计算机存储介质可包括移动存储设备、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、磁碟或者光盘等各种可以存储程序代码的介质。在一些实施例中所述计算机存储介质为非瞬间存储介质,如ROM。
本领域内的技术人员应明白,本发明的实施例可提供为方法、系统、或计算机程序产品。因此,本发明可采用硬件实施例、软件实施例、或结 合软件和硬件方面的实施例的形式。而且,本发明可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器和光学存储器等)上实施的计算机程序产品的形式。
本发明是参照根据本发明实施例的方法、设备(系统)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。
这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。
这些计算机程序指令也可装载到计算机或其他可编程数据处理设备上,使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。
以上所述,仅为本发明的较佳实施例而已,并非用于限定本发明的保护范围。凡按照本发明原理所作的修改,都应当理解为落入本发明的保护范围。

Claims (33)

  1. 一种写文件的方法,应用于文件访问客户端,其中,所述方法包括:
    接收应用程序发送的写请求,其中,所述写请求用于请求将待写入数据写入目标文件;
    从本地数据库中获得所述目标文件的元数据,其中,所述元数据至少包括所述目标文件的分片位置信息;
    根据所述分片位置信息,将所述待写入数据写入对应的数据服务器。
  2. 根据权利要求1所述的方法,其中,在所述根据所述分片位置信息,将所述待写入数据写入对应的数据服务器之前,所述方法还包括:
    向远端元数据服务器发送写锁请求,其中,所述写锁请求用于请求所述远端元数据服务器写锁所述元数据;
    接收所述远端元数据服务器返回的写锁应答,其中,所述写锁应答中携带有时间戳;
    将所述时间戳保存至所述本地数据库。
  3. 根据权利要求1所述的方法,其中,在所述根据所述分片位置信息,将所述待写入数据写入对应的数据服务器之后,所述方法还包括:
    更新所述本地数据库中所述元数据;
    将更新后的元数据同步至远端元数据服务器。
  4. 根据权利要求3所述的方法,其中,所述将更新后的元数据同步至远端元数据服务器,包括:
    在写入所述待写入数据的过程中,每间隔预设时长,从所述本地数据库中获取所述更新后的元数据,并同步至所述远端元数据服务器;或,
    接收来自所述应用程序的关闭请求,从所述本地数据库中获取所述更新后的元数据,并同步至所述远端元数据服务器。
  5. 根据权利要求1所述的方法,其中,在所述接收应用程序发送的写请求之前,所述方法还包括:
    接收所述应用程序发送的文件创建请求,其中,所述文件创建请求用于请求为所述应用程序创建所述目标文件;
    向目录树服务器发送索引节点创建请求,其中,所述索引节点创建请求用于请求所述目录树服务器为所述目标文件创建索引节点;
    接收并在所述本地数据库中添加来自所述目录树服务器的所述索引节点的索引信息以及所述元数据,完成所述目标文件的创建。
  6. 一种读文件的方法,应用于文件访问客户端,所述方法包括:
    接收应用程序发送的读取请求,其中,所述读取请求用于请求读取目标文件中的待读取数据;
    从本地数据库中获得所述目标文件的元数据,其中,所述元数据至少包括所述目标文件的分片位置信息;
    根据所述分片位置信息,从对应的数据服务器中读取所述待读取数据;
    将所述待读取数据返回所述应用程序。
  7. 根据权利要求6所述的方法,其中,在所述接收应用程序发送的读取请求之前,所述方法还包括:
    接收所述应用程序发送的读锁请求,其中,所述读锁请求用于请求读锁所述目标文件;
    当所述元数据存储在所述本地数据库时,返回读锁成功应答给所述应用程序;
    当所述元数据没有存储在所述本地数据库时,从远端元数据服务器获取所述元数据后,保存在所述本地数据库中,并返回所述读锁成功应答给所述应用程序。
  8. 根据权利要求7所述的方法,其中,在所述接收所述应用程序发送 的读锁请求之后,所述方法还包括:
    向所述远端元数据服务器发送所述目标文件的时间戳,其中,所述时间戳用于所述远端元数据服务器确定所述元数据是否存储于所述本地数据库。
  9. 根据权利要求6所述的方法,其中,在所述将所述待读取数据返回所述应用程序之后,所述方法还包括:
    接收所述应用程序发送的关闭请求后,通知远端元数据服务器释放所述目标文件的读锁,其中,所述关闭请求用于请求关闭所述目标文件。
  10. 一种删除文件的方法,应用于文件访问客户端,所述方法包括:
    接收所述应用程序发送的删除文件请求;
    删除本地数据库中的目标文件的元数据。
  11. 根据权利要求10所述的方法,其中,在所述接收所述应用程序发送的删除文件请求之后,所述方法还包括:
    向远端元数据服务器发送第一删除请求,其中,所述第一删除请求用于指示所述远端元数据服务器删除所述元数据;
    接收所述远端元数据服务器发送的删除应答。
  12. 根据权利要求11所述的方法,其中,在所述向远端元数据服务器发送第一删除请求之前,所述方法还包括:
    向目录树服务器发送第二删除请求,其中,所述第二删除请求用于指示所述目录树服务器删除所述目标文件的索引信息。
  13. 根据权利要求11所述的方法,其中,在所述接收所述远端元数据服务器发送的删除应答之后,所述方法还包括:
    向其它文件访问客户端通知所述目标文件已删除。
  14. 一种查询文件的方法,应用于文件访问客户端,所述方法包括:
    接收应用程序发送的查询请求,其中,所述查询请求用于查询目标文 件的元数据;
    在本地数据库中查询到所述元数据后,返回所述元数据给所述应用程序。
  15. 根据权利要求14所述的方法,其中,所述接收应用程序发送的查询请求之后,所述方法还包括:
    在所述本地数据库中未查询到所述元数据后,从远端元数据服务器获取所述元数据;
    将所述元数据存储于所述本地数据库,并返回所述元数据给所述应用程序。
  16. 根据权利要求14所述的方法,其中,所述方法还包括:
    当所述本地数据库的数据存储量超过淘汰门限值时,根据所述本地数据库当前同步的时间戳,将与远端元数据服务器中的时间戳间隔大于预设值的元数据删除。
  17. 一种文件访问客户端,所述文件访问客户端包括:文件访问模块、本地元数据服务模块以及本地数据库;其中,
    所述文件访问模块,配置为接收应用程序发送的写请求,其中,所述写请求用于请求将待写入数据写入目标文件;还用于根据所述目标文件的分片位置信息,将所述待写入数据写入对应的数据服务器;
    所述本地元数据服务模块,配置为从本地数据库中获得所述目标文件的元数据,其中,所述元数据至少包括所述分片位置信息;
    所述本地数据库,配置为存储所述元数据。
  18. 根据权利要求17所述的文件访问客户端,其中,所述本地元数据服务模块,还配置为在所述文件访问模块根据所述分片位置信息,将所述待写入数据写入所述数据服务器之前,向远端元数据服务器发送写锁请求,其中,所述写锁请求用于请求所述远端元数据服务器写锁所述元数据;接 收所述远端元数据服务器返回的写锁应答,其中,所述写锁应答中携带有时间戳;将所述时间戳保存至所述本地数据库。
  19. 根据权利要求17所述的文件访问客户端,其中,所述本地元数据服务模块,还配置为在所述文件访问模块根据所述分片位置信息,将所述待写入数据写入所述数据服务器之后,更新所述本地数据库中所述元数据;将更新后的元数据同步至远端元数据服务器。
  20. 根据权利要求19所述的文件访问客户端,其中,所述本地元数据服务模块,配置为在写入所述待写入数据的过程中,每间隔预设时长,从所述本地数据库中获取所述更新后的元数据,并同步至所述远端元数据服务器;或,接收来自所述应用程序的关闭请求,从所述本地数据库中获取所述更新后的元数据,并同步至所述远端元数据服务器。
  21. 根据权利要求17所述的文件访问客户端,其中,所述文件访问模块,还配置为在接收所述写请求之前,接收所述应用程序发送的文件创建请求,其中,所述文件创建请求用于请求为所述应用程序创建所述目标文件;
    所述本地元数据服务模块,还配置为向目录树服务器发送索引节点创建请求,其中,所述索引节点创建请求用于请求所述目录树服务器为所述目标文件创建索引节点;接收并在所述本地数据库中添加来自所述目录树服务器的所述索引节点的索引信息以及所述元数据,完成所述目标文件的创建。
  22. 根据权利要求17所述的文件访问客户端,其中,所述文件访问模块,还配置为接收应用程序发送的读取请求,其中,所述读取请求用于请求读取目标文件中的待读取数据;还用于将所述待读取数据返回所述应用程序;
    所述本地元数据服务模块,还配置为从所述本地数据库中获得所述目 标文件的元数据,其中,所述元数据至少包括所述目标文件的分片位置信息;根据所述分片位置信息,从对应的数据服务器中读取所述待读取数据。
  23. 根据权利要求22所述的文件访问客户端,其中,所述文件访问模块,配置为在接收应用程序发送的读取请求之前,接收所述应用程序发送的读锁请求,其中,所述读锁请求用于请求读锁所述目标文件;当所述元数据存储在所述本地数据库时,返回读锁成功应答给所述应用程序;还配置为当所述元数据没有存储在所述本地数据库时,将所述元数据保存在所述本地数据库中之后,返回所述读锁成功应答给所述应用程序;
    所述本地元数据服务模块,还配置为当所述元数据没有存储在所述本地数据库时,从远端元数据服务器获取所述元数据后,保存在所述本地数据库中。
  24. 根据权利要求23所述的文件访问客户端,其中,所述本地元数据服务模块,配置为在所述文件访问模块接收所述应用程序发送的读锁请求之后,向所述远端元数据服务器发送所述目标文件的时间戳,其中,所述时间戳用于所述远端元数据服务器确定所述元数据是否存储于所述本地数据库。
  25. 根据权利要求22所述的文件访问客户端,其中,所述文件访问模块,还配置为在将所述待读取数据返回所述应用程序之后,接收所述应用程序发送的关闭请求,其中,所述关闭请求用于请求关闭所述目标文件;
    所述本地元数据服务模块,还配置为通知远端元数据服务器释放所述目标文件的读锁。
  26. 根据权利要求17所述的文件访问客户端,其中,所述文件访问模块,还配置为接收所述应用程序发送的删除文件请求;
    所述本地元数据服务模块,还配置为删除本地数据库中的目标文件的元数据。
  27. 根据权利要求26所述的文件访问客户端,其中,所述本地元数据服务模块,还配置为在所述文件访问模块接收所述应用程序发送的删除文件请求之后,向远端元数据服务器发送第一删除请求,其中,所述第一删除请求用于指示所述远端元数据服务器删除所述元数据;接收所述远端元数据服务器发送的删除应答。
  28. 根据权利要求27所述的文件访问客户端,其中,所述本地元数据服务模块,还配置为在向所述远端元数据服务器发送第一删除请求之前,向目录树服务器发送第二删除请求,其中,所述第二删除请求用于指示所述目录树服务器删除所述目标文件的索引信息。
  29. 根据权利要求26所述的文件访问客户端,其中,所述本地元数据服务模块,还配置为在接收所述远端元数据服务器发送的删除应答之后,向其它文件访问客户端通知所述目标文件已删除。
  30. 根据权利要求17所述的文件访问客户端,其中,所述文件访问模块,还配置为接收应用程序发送的查询请求,其中,所述查询请求用于查询目标文件的元数据;还用于返回所述元数据给所述应用程序;
    所述本地元数据服务模块,还配置为在本地数据库中查询所述元数据。
  31. 根据权利要求30所述的文件访问客户端,其中,所述本地元数据服务模块,还配置为在所述文件访问模块接收所述应用程序发送的查询请求之后,在所述本地数据库中未查询到所述元数据后,从远端元数据服务器获取所述元数据;将所述元数据存储于所述本地数据库;
    所述文件访问模块,还配置为返回所述元数据给所述应用程序。
  32. 根据权利要求30所述的文件访问客户端,其中,所述本地元数据服务模块,还配置为当所述本地数据库的数据存储量超过淘汰门限值时,根据所述本地数据库当前同步的时间戳,将与远端元数据服务器中的时间戳间隔大于预设值的元数据删除。
  33. 一种计算机存储介质,所述计算机存储介质中存储有计算机可执行指令,所述计算机可执行指令用于执行权利要求1至16所述方法的至少其中之一。
PCT/CN2015/082131 2014-12-04 2015-06-23 写、读、删除、查询文件的方法、客户端和存储介质 WO2016086649A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201410733953.9A CN105718484A (zh) 2014-12-04 2014-12-04 写文件、读文件、删除文件、查询文件的方法及客户端
CN201410733953.9 2014-12-04

Publications (1)

Publication Number Publication Date
WO2016086649A1 true WO2016086649A1 (zh) 2016-06-09

Family

ID=56090902

Family Applications (2)

Application Number Title Priority Date Filing Date
PCT/CN2015/074949 WO2016086552A1 (zh) 2014-12-04 2015-03-24 一种文件处理的方法及客户端
PCT/CN2015/082131 WO2016086649A1 (zh) 2014-12-04 2015-06-23 写、读、删除、查询文件的方法、客户端和存储介质

Family Applications Before (1)

Application Number Title Priority Date Filing Date
PCT/CN2015/074949 WO2016086552A1 (zh) 2014-12-04 2015-03-24 一种文件处理的方法及客户端

Country Status (2)

Country Link
CN (1) CN105718484A (zh)
WO (2) WO2016086552A1 (zh)

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107133304A (zh) * 2017-04-28 2017-09-05 努比亚技术有限公司 一种数据操作方法、装置及计算机可读存储介质
CN107562757A (zh) * 2016-07-01 2018-01-09 阿里巴巴集团控股有限公司 基于分布式文件系统的查询、访问方法、装置及系统
CN111125034A (zh) * 2019-12-27 2020-05-08 深信服科技股份有限公司 一种聚合对象数据处理方法、系统及相关设备
CN111309245A (zh) * 2018-12-12 2020-06-19 阿里巴巴集团控股有限公司 一种分层存储写入方法和装置、读取方法和装置及系统
CN111737223A (zh) * 2020-06-28 2020-10-02 浪潮电子信息产业股份有限公司 一种文件拷贝方法、装置、设备及存储介质
CN114356230A (zh) * 2021-12-22 2022-04-15 天津南大通用数据技术股份有限公司 一种提高列存储引擎读性能的方法及系统
WO2022170891A1 (zh) * 2021-02-10 2022-08-18 华为技术有限公司 一种文件接续方法、装置、终端设备以及存储介质
CN116521744A (zh) * 2023-06-30 2023-08-01 杭州拓数派科技发展有限公司 全双工元数据传输方法、装置、系统和计算机设备

Families Citing this family (31)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107656939A (zh) * 2016-07-26 2018-02-02 南京中兴新软件有限责任公司 文件写入方法及装置
CN107783776B (zh) * 2016-08-26 2021-10-15 斑马智行网络(香港)有限公司 固件升级包的处理方法及装置、电子设备
CN106354830B (zh) * 2016-08-31 2020-12-04 天津南大通用数据技术股份有限公司 一种数据库集群节点间数据同步的方法及装置
CN106960055B (zh) * 2017-04-01 2020-08-04 广东浪潮大数据研究有限公司 一种文件删除方法及装置
CN108449376A (zh) * 2018-01-31 2018-08-24 合肥和钧正策信息技术有限公司 一种服务于企业的大数据计算节点的负载均衡方法
CN110109886B (zh) * 2018-02-01 2022-11-18 中兴通讯股份有限公司 分布式文件系统的文件存储方法及分布式文件系统
CN110334072A (zh) * 2018-03-22 2019-10-15 腾讯科技(深圳)有限公司 一种分布式文件系统、文件更新方法及装置
CN109299035B (zh) * 2018-07-04 2021-10-15 中通服建设有限公司 一种chr文件管理方法、系统及计算机可读存储介质
CN110968563B (zh) * 2018-09-29 2023-11-17 华为技术有限公司 一种数据存储方法、元数据服务器及客户端
CN109885620A (zh) * 2018-12-25 2019-06-14 航天信息股份有限公司 基于Hive数据仓库的元数据读取方法及装置
CN109976668A (zh) * 2019-03-14 2019-07-05 北京达佳互联信息技术有限公司 数据删除方法、数据删除装置和计算机可读存储介质
CN110543325A (zh) * 2019-08-15 2019-12-06 中国银行股份有限公司 数据处理方法及装置
CN112578996B (zh) * 2019-09-30 2024-06-04 华为云计算技术有限公司 一种存储系统的元数据的发送方法及存储系统
CN110830580B (zh) * 2019-11-12 2023-04-18 腾讯云计算(北京)有限责任公司 一种存储数据同步方法及装置
CN111078643B (zh) * 2019-12-16 2022-07-22 新华三大数据技术有限公司 一种批量删除文件的方法、装置及电子设备
CN111026936B (zh) * 2019-12-18 2023-10-20 鹏城实验室 交互主题的数据认知方法、装置、终端及计算机存储介质
CN111176898A (zh) * 2019-12-29 2020-05-19 浪潮电子信息产业股份有限公司 分布式文件系统mds故障切换方法、装置、设备和介质
CN111241455B (zh) * 2020-01-22 2023-08-25 抖音视界有限公司 数据处理装置、计算机设备及存储介质
CN111198845B (zh) * 2020-02-13 2023-07-21 橙三角(广东)科技有限公司 一种数据迁移方法、可读存储介质及计算设备
CN111427841A (zh) * 2020-02-26 2020-07-17 平安科技(深圳)有限公司 数据管理方法、装置、计算机设备和存储介质
CN111339046B (zh) * 2020-02-26 2023-09-19 中国工商银行股份有限公司 针对文件的数据写入、读取和删除方法及装置
CN111597149B (zh) * 2020-04-27 2023-03-31 五八有限公司 一种数据库的数据清理方法及装置
CN111597196B (zh) * 2020-05-09 2024-02-13 北京百度网讯科技有限公司 一种数据处理方法、装置和电子设备
CN111831618A (zh) * 2020-07-21 2020-10-27 北京青云科技股份有限公司 数据写入方法、数据读取方法、装置、设备及存储介质
CN112053128B (zh) * 2020-09-03 2023-12-01 国网上海电力设计有限公司 一种电网工程标准化族库数据管理系统及方法
CN112685094B (zh) * 2020-12-24 2023-12-22 北京浪潮数据技术有限公司 一种服务卸载方法、装置、设备及计算机可读存储介质
CN113032335A (zh) * 2021-05-24 2021-06-25 北京世纪好未来教育科技有限公司 文件访问方法、装置、设备及存储介质
CN115017534B (zh) * 2021-11-05 2023-08-29 荣耀终端有限公司 文件处理权限控制方法、装置及存储介质
CN114461146B (zh) * 2022-01-26 2024-05-07 北京百度网讯科技有限公司 云存储的数据处理方法、装置、系统、设备、介质及产品
CN114676166B (zh) * 2022-05-26 2022-10-11 阿里巴巴(中国)有限公司 数据处理方法及装置
CN115470008B (zh) * 2022-11-14 2023-03-10 杭州拓数派科技发展有限公司 一种元数据访问方法、装置和存储介质

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101673288A (zh) * 2009-10-13 2010-03-17 中兴通讯股份有限公司 一种iptv系统中的读、写文件的方法和系统
CN102682012A (zh) * 2011-03-14 2012-09-19 成都市华为赛门铁克科技有限公司 一种文件系统内读写数据的方法及装置
CN102880658A (zh) * 2012-08-31 2013-01-16 电子科技大学 基于地震数据处理的分布式文件管理系统

Family Cites Families (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101997884B (zh) * 2009-08-18 2014-05-14 升东网络科技发展(上海)有限公司 分布式存储系统和方法
CN102164161B (zh) * 2011-01-10 2013-12-04 清华大学 一种对并行文件系统进行文件布局提取的方法和装置
CN102143215B (zh) * 2011-01-20 2013-04-10 中国人民解放军理工大学 一种基于网络的pb级云存储系统及其处理方法
CN102999519B (zh) * 2011-09-15 2017-05-17 上海盛付通电子商务有限公司 一种数据库的读写方法及系统
US9378218B2 (en) * 2011-10-24 2016-06-28 Electronics And Telecommunications Research Institute Apparatus and method for enabling clients to participate in data storage in distributed file system
CN102546776B (zh) * 2011-12-27 2014-10-22 北京中科大洋科技发展股份有限公司 一种san共享文件系统中实现离线读文件的方法
CN103076994B (zh) * 2012-12-31 2016-02-03 北京中科大洋科技发展股份有限公司 一种san共享文件系统中实现离线写文件的方法
CN103167026B (zh) * 2013-02-06 2016-05-18 数码辰星科技发展(北京)有限公司 一种云存储环境数据处理方法、系统及设备
CN104144150A (zh) * 2013-05-10 2014-11-12 中国电信股份有限公司 利用元数据访问信息的方法、装置和系统
CN103310000B (zh) * 2013-06-25 2017-06-16 曙光信息产业(北京)有限公司 元数据管理方法

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101673288A (zh) * 2009-10-13 2010-03-17 中兴通讯股份有限公司 一种iptv系统中的读、写文件的方法和系统
CN102682012A (zh) * 2011-03-14 2012-09-19 成都市华为赛门铁克科技有限公司 一种文件系统内读写数据的方法及装置
CN102880658A (zh) * 2012-08-31 2013-01-16 电子科技大学 基于地震数据处理的分布式文件管理系统

Cited By (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107562757A (zh) * 2016-07-01 2018-01-09 阿里巴巴集团控股有限公司 基于分布式文件系统的查询、访问方法、装置及系统
CN107562757B (zh) * 2016-07-01 2021-08-10 阿里巴巴集团控股有限公司 基于分布式文件系统的查询、访问方法、装置及系统
CN107133304A (zh) * 2017-04-28 2017-09-05 努比亚技术有限公司 一种数据操作方法、装置及计算机可读存储介质
CN111309245A (zh) * 2018-12-12 2020-06-19 阿里巴巴集团控股有限公司 一种分层存储写入方法和装置、读取方法和装置及系统
CN111309245B (zh) * 2018-12-12 2024-04-09 阿里巴巴集团控股有限公司 一种分层存储写入方法和装置、读取方法和装置及系统
CN111125034A (zh) * 2019-12-27 2020-05-08 深信服科技股份有限公司 一种聚合对象数据处理方法、系统及相关设备
CN111737223A (zh) * 2020-06-28 2020-10-02 浪潮电子信息产业股份有限公司 一种文件拷贝方法、装置、设备及存储介质
WO2022170891A1 (zh) * 2021-02-10 2022-08-18 华为技术有限公司 一种文件接续方法、装置、终端设备以及存储介质
CN114356230A (zh) * 2021-12-22 2022-04-15 天津南大通用数据技术股份有限公司 一种提高列存储引擎读性能的方法及系统
CN114356230B (zh) * 2021-12-22 2024-04-23 天津南大通用数据技术股份有限公司 一种提高列存储引擎读性能的方法及系统
CN116521744A (zh) * 2023-06-30 2023-08-01 杭州拓数派科技发展有限公司 全双工元数据传输方法、装置、系统和计算机设备
CN116521744B (zh) * 2023-06-30 2023-09-12 杭州拓数派科技发展有限公司 全双工元数据传输方法、装置、系统和计算机设备

Also Published As

Publication number Publication date
CN105718484A (zh) 2016-06-29
WO2016086552A1 (zh) 2016-06-09

Similar Documents

Publication Publication Date Title
WO2016086649A1 (zh) 写、读、删除、查询文件的方法、客户端和存储介质
US11531482B2 (en) Data deduplication method and apparatus
WO2019085471A1 (zh) 数据库同步方法、应用服务器及计算机可读存储介质
US11144510B2 (en) System and method for synchronizing file systems with large namespaces
CN107291869B (zh) 一种分布式服务系统及其数据查询的方法
US11157445B2 (en) Indexing implementing method and system in file storage
US8719237B2 (en) Method and apparatus for deleting duplicate data
KR20190095066A (ko) 정보 처리 방법, 장치, 서버 및 컴퓨터 판독 가능 매체
EP3862883B1 (en) Data backup method and apparatus, and system
CN111221469B (zh) 同步缓存数据的方法、装置和系统
CN107153644B (zh) 一种数据同步方法及装置
CN109460438B (zh) 消息数据存储方法、装置、计算机设备和存储介质
US10838827B2 (en) System and method for time parameter based database restoration
US20170031948A1 (en) File synchronization method, server, and terminal
TW201202959A (en) Data synchronization methods for synchronizing data in communication systems and communication systems
CN102694860A (zh) 一种云存储的数据处理方法、设备及系统
US20150120662A1 (en) Synchronizing event history for multiple clients
JP5686034B2 (ja) クラスタシステム、同期制御方法、サーバ装置および同期制御プログラム
CN105450682B (zh) 一种用于数据同步保存、向客户端同步数据的方法、装置和系统
WO2016029744A1 (zh) 一种元数据恢复方法及相关装置
US10572450B2 (en) Reducing database fragmentation
CN112632375B (zh) 会话信息处理方法、服务器及存储介质
US20160012070A1 (en) Methods for managing a request to list previous versions of an object and devices thereof
US11093453B1 (en) System and method for asynchronous cleaning of data objects on cloud partition in a file system with deduplication
CN110442645B (zh) 数据索引方法及装置

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 15864445

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 15864445

Country of ref document: EP

Kind code of ref document: A1