Looking for breakthrough ideas for innovation challenges? Try Patsnap Eureka!

File writing method, file reading method, file deletion method, file query method and client

A client-side and file-writing technology, applied in electrical components, special data processing applications, instruments, etc., to solve problems such as the absence of metadata servers

Inactive Publication Date: 2016-06-29
ZTE CORP
View PDF7 Cites 29 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0003] However, there is no reasonable technical solution for alleviating the pressure on the metadata server in the prior art

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • File writing method, file reading method, file deletion method, file query method and client
  • File writing method, file reading method, file deletion method, file query method and client
  • File writing method, file reading method, file deletion method, file query method and client

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0050] figure 2 It is a schematic flow chart of the method for writing files in the embodiment of the present invention, see figure 2 As shown, the method includes:

[0051] S201: Receive a write request sent by the application program, wherein the write request is used to request to write the data to be written into the target file;

[0052] In another embodiment, in order to enable the file access client to have the permission to write files, then, before S201, 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 writes lock metadata; receives a write lock response returned by the remote metadata server, wherein the write lock response carries a timestamp; saves the timestamp to a local database.

[0053] Specifically, the local metadata service module initiates a write lock request to the remote metadata server, and the remote metadata server responds to the ...

Embodiment 2

[0068] image 3 It is a schematic flow chart of the method for reading files in the embodiment of the present invention, see image 3 As shown, the method includes:

[0069] S301: Receive a read request sent by the application program, wherein the read request is used to request to read the data to be read in the target file;

[0070] Specifically, when the application program needs to read a certain part of data in the target file, it can send a read request to the file access module, requesting to read the data to be read in the target file.

[0071] Further, before reading the file, the file access client needs to obtain the permission to read the file, so before S301, the method also includes: receiving a read lock request sent by the application program, wherein the read lock request is used to request a read lock target file ;When the metadata is stored in the local database, return a read lock success response to the application; when the metadata is not stored in the...

Embodiment 3

[0081] Figure 4 It is a schematic flow chart of the method for deleting files in the embodiment of the present invention, see Figure 4 As shown, the method includes:

[0082] S401: Receive a file deletion request sent by an application program;

[0083] Specifically, when the application program needs to delete the target file, it can send a file deletion request to the file access module.

[0084] S402: Delete the metadata of the target file in the local database.

[0085] Specifically, in response to the request, the file access module invokes the local metadata service module to delete the metadata of the target file in the local database.

[0086] Further, after S402, the local metadata service module may also send a first deletion request to the remote metadata server, wherein the first deletion request is used to instruct the remote metadata server to delete the metadata; receiving the remote metadata server The delete reply sent.

[0087] Specifically, after the ...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

Embodiments of the invention disclose a file writing method which is applied to a file access client. The method comprises the following steps: receiving a write request sent by an application program, wherein the write request is used for requesting to write to-be-written data in a target file; obtaining metadata of the target file from a local database, wherein the metadata at least comprises fragment position information of the target file; and writing the to-be-written data into a corresponding data server according to the fragment position information. The embodiments of the invention furthermore provide a file reading method, a file deletion method, a file query method and corresponding equipment.

Description

technical field [0001] The invention relates to the field of distributed file systems, in particular to methods for writing files, reading files, deleting files, and querying files, and a client. Background technique [0002] With the widespread application of distributed file systems, the file size has rapidly increased from tens of millions to hundreds of millions, billions, and tens of billions. With such a huge amount of files, especially the increasing number of small files, applications need to write, read or modify their metadata frequently, so the file access client frequently interacts with metadata, Overwhelm the metadata server. [0003] However, there is no reasonable technical solution for alleviating the pressure on the metadata server in the prior art. Contents of the invention [0004] In view of this, the embodiment of the present invention expects to provide methods and clients for writing files, reading files, deleting files, and querying files, so as ...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
IPC IPC(8): G06F17/30H04L29/08
CPCG06F16/00
Inventor 林健尹丹朱鹏
Owner ZTE CORP
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Patsnap Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Patsnap Eureka Blog
Learn More
PatSnap group products