CN110119387A - A kind of file delet method, device, equipment and readable storage medium storing program for executing - Google Patents
A kind of file delet method, device, equipment and readable storage medium storing program for executing Download PDFInfo
- Publication number
- CN110119387A CN110119387A CN201910434795.XA CN201910434795A CN110119387A CN 110119387 A CN110119387 A CN 110119387A CN 201910434795 A CN201910434795 A CN 201910434795A CN 110119387 A CN110119387 A CN 110119387A
- Authority
- CN
- China
- Prior art keywords
- file
- deleted
- queue
- deletion
- metadata service
- 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.)
- Pending
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/10—File systems; File servers
- G06F16/16—File or folder operations, e.g. details of user interfaces specifically adapted to file systems
- G06F16/162—Delete operations
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Human Computer Interaction (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
The invention discloses a kind of file delet method, this method receives the deletion that file deletion requests carry out when file deletes response without waiting for Metadata Service in client and successfully replys, and returns and is deleted successfully directly to user.Then Metadata Service carries out delete operation according to configuration parameter according to the deletion task having been received.File destination is added in queue to be deleted after receiving deletion task by the asynchronous deletion of file for this method, it is subsequent to delete one by one again, file synchronization deletion process is avoided to need to respond for Metadata Service bring instantaneous high pressure the progress of each deletion task one by one in real time, realize the control of delete operation response speed, it ensure that business operates normally while alleviating the pressure of Metadata Service, ensure that the normal operation of client user's business.The present invention also provides a kind of files to delete device, equipment and a kind of readable storage medium storing program for executing, has above-mentioned beneficial effect.
Description
Technical field
The present invention relates to technical field of data processing, in particular to a kind of file delet method, device, equipment and one kind can
Read storage medium.
Background technique
It needs often to have delete operation for internal memory optimization etc. in file scene.Such as the special bat figure of traffic police's bayonet
Piece is generally saved 3 months or so and will be deleted, and all model trainings of the data set of deep learning also will do it after finishing and delete
Except operation.
During file is deleted, the lookup lookup of file, file attribute getattr is obtained, unlink is deleted, updates
The operations such as forget are to need to communicate with Metadata Service, while needing Metadata Service to assign to the data service of lower layer and deleting
Except the order of file metadata information, file deletes process can generate certain pressure to the Metadata Service of storage.Wherein, small
File is generally KB rank, large amount of small documents delete when, to data service pressure compared with, but need high concurrent Metadata Service come
Delete operation is completed, very big pressure can be generated to the Metadata Service of storage in this case so as to cause the upper layer of storage
Business is unable to operate normally.
Therefore, how to reduce the instantaneous pressure to Metadata Service while realizing that file is deleted, be art technology
Personnel's technical issues that need to address.
Summary of the invention
The object of the present invention is to provide a kind of file delet method, this method can guarantee that deletion business normally executes same
When mitigate Metadata Service pressure;It is a further object of the present invention to provide a kind of file deletion device, equipment and one kind are readable
Storage medium has above-mentioned beneficial effect.
In order to solve the above technical problems, the present invention provides a kind of file delet method, comprising:
When client receives delete target file request, is sent to Metadata Service and delete feedback instruction;
Output, which is deleted, successfully deletes result prompt information;
Queue to be deleted is added in the file destination;
Metadata Service is controlled according to default deleting mechanism, and delete operation is executed to file in the queue to be deleted;
When receiving deletion success feedback information of the Metadata Service to the file destination, by the queue to be deleted
Described in file destination record information deletion.
Optionally, the basis is preset deleting mechanism control Metadata Service and is deleted to file in the queue to be deleted
Except operation, comprising:
Judge whether current meta data service pressure reaches preset value;
If not up to, file in the queue to be deleted to be carried out to the response of removal request by First Speed;
If had reached, file in the queue to be deleted is carried out to the response of removal request by second speed;Wherein, institute
First Speed is stated not less than the second speed.
It is optionally, described to judge whether current meta data service pressure reaches preset value, comprising:
Judge whether quantity of documents to be deleted in the queue to be deleted reaches first threshold;
If so, determining whether current meta data service pressure reaches preset value;
If not, determining that current meta data service pressure is not up to preset value.
Optionally, the basis is preset deleting mechanism control Metadata Service and is deleted to file in the queue to be deleted
Except operation, comprising:
File in the queue to be deleted is successively deleted by addition sequence.
Optionally, before queue to be deleted is added in the file destination, further includes:
Judge whether the residual capacity of the queue to be deleted is less than second threshold;
If so, document retaining removal request, the root when the residual capacity of the queue to be deleted is not less than second threshold
The queue to be deleted is added in the file destination according to file deletion requests to be processed.
To achieve the above object, disclosed herein as well is a kind of files to delete device, comprising:
Instruction sending unit when for receiving delete target file request, sending deletion feedback to Metadata Service and referring to
It enables;
Output unit is prompted, successfully deletes result prompt information for exporting to delete;
Queue fills unit, for queue to be deleted to be added in the file destination;
File deletes unit, for controlling Metadata Service to file in the queue to be deleted according to default deleting mechanism
Execute delete operation;
Record deletion unit, for working as the deletion success feedback information for receiving Metadata Service to the file destination
When, by the record information deletion of file destination described in the queue to be deleted.
Optionally, the file deletion unit includes:
Pressure judgment sub-unit, for judging whether current meta data service pressure reaches preset value;
First determines subelement, if being not up to preset value for current meta data service pressure, by the queue to be deleted
Middle file is carried out the response of removal request by First Speed;
Second determines that subelement will be in the queue to be deleted if reaching preset value for current meta data service pressure
File is carried out the response of removal request by second speed;Wherein, the First Speed is not less than the second speed.
Optionally, the pressure judgment sub-unit includes:
Whether judgment sub-unit, the quantity of documents for judging to be deleted in the queue to be deleted reach first threshold;
Third determines subelement, for when quantity of documents to be deleted in the queue to be deleted reaches first threshold,
Determine whether current meta data service pressure reaches preset value;
4th determines subelement, for being not up to first threshold when quantity of documents to be deleted in the queue to be deleted
When, determine that current meta data service pressure is not up to preset value.
To achieve the above object, present invention also provides a kind of file sweep equipments, comprising:
Memory, for storing computer program;
Processor, when for executing the computer program the step of file delet method described in realization.
To achieve the above object, described computer-readable to deposit present invention also provides a kind of computer readable storage medium
Computer program is stored on storage media, the computer program realizes the file delet method when being executed by the processor
The step of.
File delet method provided by the present invention carries out file deletion response when client receives file deletion requests
When successfully replied without waiting for the deletion of Metadata Service, return and deleted successfully directly to user.Then Metadata Service according to
According to the deletion task having been received, delete operation is carried out according to configuration parameter.This method is being received by the asynchronous deletion of file
File destination is added in queue to be deleted after to deletion task, it is subsequent to delete one by one again, it avoids file synchronization and deletes process
It needs that each deletion task responded one by one for Metadata Service bring instantaneous high pressure in real time, realizes delete operation and ring
Speed control is answered, the business that ensure that operates normally while alleviating the pressure of Metadata Service, ensure that client user's business
Normal operation.
The present invention also provides a kind of files to delete device, equipment and a kind of readable storage medium storing program for executing, has above-mentioned beneficial to effect
Fruit, details are not described herein.
Detailed description of the invention
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 technical 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 a kind of flow chart of file delet method provided in an embodiment of the present invention;
Fig. 2 is the structural block diagram that a kind of file provided in an embodiment of the present invention deletes device;
Fig. 3 is a kind of file sweep equipment structural schematic diagram provided in an embodiment of the present invention.
Specific embodiment
Core of the invention is to provide a kind of file delet method, and this method can guarantee that deletion business normally executes same
When mitigate Metadata Service pressure;Another core of the invention is to provide a kind of file and deletes device, equipment and a kind of readable
Storage medium.
In order to make the object, technical scheme and advantages of the embodiment of the invention clearer, below in conjunction with the embodiment of the present invention
In attached drawing, technical scheme in the embodiment of the invention is clearly and completely described, it is clear that described embodiment is
A part of the embodiment of the present invention, instead of all the embodiments.Based on the embodiments of the present invention, those of ordinary skill in the art
Every other embodiment obtained without making creative work, shall fall within the protection scope of the present invention.
During file is deleted, the lookup lookup of file, file attribute getattr is obtained, unlink is deleted, updates
The operations such as forget are to need to communicate with Metadata Service, while needing Metadata Service to assign to the data service of lower layer and deleting
Except the order of file metadata information.By taking small documents largely deletion process as an example, when large amount of small documents is deleted, Metadata Service is needed
High concurrent is wanted to complete delete operation.The Metadata Service of storage can be generated when executing small documents and deleting very big
Pressure is unable to operate normally so as to cause the upper-layer service of storage.
File delet method provided by the present application may be implemented to reduce the pressure to Metadata Service while file is deleted,
It can guarantee the normal operation of customer service.
Embodiment one:
Referring to FIG. 1, Fig. 1 is the flow chart of file delet method provided in this embodiment;This method mainly includes following
Step:
Step s110: it when client receives delete target file request, is sent to Metadata Service and deletes feedback instruction.
Step s120: output, which is deleted, successfully deletes result prompt information.
When user executes delete operation, client (client) will start the operation of the deletion (unlink) to file destination.
Client (client) can send unlink order to Metadata Service in Unlink operation, delete back to Metadata Service transmission
Feedback instruction (make_request), the order is synchronous during traditional file is deleted, when Metadata Service receives
The metadata information and data information for carrying out deleting this document when the request of unlink can just be given later
Client return is deleted successfully, i.e. client needs that Metadata Service is waited to complete to reply unlink order after file is deleted,
Unlink order confirmation this document that client receives reply returns to delete after being deleted successfully deletes result prompt information.
The process I/O path is longer, time-consuming more, and when heap file occur while deleting the case where when be in time to user request into
Row feedback needs to spend a large amount of Metadata Services for file deletion, can bring biggish pressure to Metadata Service, while by
It is lower in the huge feedback real-time of portfolio, and occupying a large amount of Metadata Services can be to the other business of user for file deletion
Normal operation has an impact.
Request Recovery Process is converted into asynchronous mechanism in the application, i.e., client, which receives, asks the deletion of file destination
Ask starting unlink operation, send unlink make_request notice Metadata Service have file need be deleted after, nothing
It needs to wait for the deletion that Metadata Service carries out after real-time files deletion successfully to reply, returns to delete directly to user and successfully delete
As a result prompt information greatly improves the response speed for user's delete operation.
In addition, sent to Metadata Service delete feedback instruction deleted with output successfully delete result prompt information can be with
It is performed simultaneously, can also be executed with reversed order, it is not limited here.To avoid caused by the failure of Metadata Service release tasks
File, which is deleted, ignores influence to subsequent processing, can be exported again after issuing deletion task to Metadata Service as far as possible deletion at
The prompt information of function.
Step s130: queue to be deleted is added in file destination.
Step s140: Metadata Service is controlled according to default deleting mechanism, deletion behaviour is carried out to file in queue to be deleted
Make.
Step s150: when receiving deletion success feedback information of the Metadata Service to file destination, by team to be deleted
The record information deletion of file destination in column.
It is returned to user after deleting successfully deletion result prompt information, Metadata Service is according to the deletion feedback received
The instruction execution carry out delete operation lasting according to configuration parameter control speed, including queue to be deleted is added in file destination,
And file is deleted by queue to be deleted.
Wherein, the process for carrying out file deletion according to queue to be deleted can be randomly selected file and be deleted, can also be with
File in queue to be deleted is successively deleted by addition sequence, the latter can reinforce file and delete the logicality of process and can chase after
Tracing back property;It can delete one by one, multiple files etc. can also be deleted simultaneously, it is not limited here.
After client returns to user and to delete successful prompt information Metadata Service when complete file delete for
The response of business is deleted substantially without influence in front end, therefore backstage deletes work and is not necessarily to be rapidly completed while receiving, after being in
Platform controllable state can cooperate backstage other metadata business that a large amount of delete operation speed controls of user get off, and guarantee industry
Business operates normally while mitigating the pressure of Metadata Service.
The deleting mechanism specifically used when controlling Metadata Service and executing delete operation to file in queue to be deleted
In the present embodiment without limitation, since backstage is deleted, delete operation can be placed in lower priority, it is high preferential when receiving
The speed for deleting file can be reduced when grade metadata business, carries out heap file again when backstage Metadata Service is more idle
It deletes;Lower file can also be set and delete threshold value, Metadata Service is controlled with lower speed and persistently carry out file deletion
Work is only introduced by taking above two deleting mechanism as an example, other deletions herein until all file deletion completions to be deleted
Details are not described herein for mechanism, can refer to the introduction of the present embodiment.
In the scene for deleting demand there are file, especially in a variety of scenes for deleting demand there are small documents, this reality
The asynchronous deleting mechanism for applying example offer can be good at mitigating the pressure of Metadata Service, while also can normally guarantee to delete industry
The case where doing honest work normal execution, providing while delete performance, the delete operation of user will not be caused to block, enhances
The competitiveness of product.
It should be noted that file delet method provided by the present application can be applied to distributed storage product AS13000
And other have the storage system of similar documents deleting mechanism with AS13000.
Based on above-mentioned introduction, file delet method disclosed by the embodiments of the present invention is asked when client receives file deletion
Ask and successfully replied when file deletes response without waiting for the deletion of Metadata Service, returned directly to user delete at
Function.Then Metadata Service carries out delete operation according to configuration parameter according to the deletion task having been received.This method passes through
File destination is added in queue to be deleted after receiving deletion task for the asynchronous deletion of file, subsequent to delete one by one again, avoids
File synchronization delete process need to carry out each deletion task to respond one by one in real time it is instantaneously high for Metadata Service bring
Pressure realizes the control of delete operation response speed, and the business that ensure that operates normally while alleviating the pressure of Metadata Service, protects
The normal operation of client user's business is demonstrate,proved.
Embodiment two:
Deleting mechanism employed in file delete operation is carried out without limitation in step S140 in above-described embodiment, this
Embodiment is discussed in detail the file under a kind of deleting mechanism and deletes mode to deepen the understanding to technical scheme.
Optionally, Metadata Service is controlled according to default deleting mechanism and delete operation tool is carried out to file in queue to be deleted
Body may comprise steps of:
Judge whether current meta data service pressure reaches preset value;
If not up to, file in queue to be deleted to be carried out to the response of removal request by First Speed;
If had reached, file in queue to be deleted is carried out to the response of removal request by second speed;Wherein, the first speed
Degree is not less than second speed.
The process for carrying out file deletion can at the uniform velocity be deleted according to unified speed, can also be according to the clothes of metadata
Pressure of being engaged in carries out speed change deletion.If current meta data service pressure hour increases file deletion amount, with as early as possible will be all to be deleted
File delete complete;If currently other customer services are big for Metadata Service pressure, less metadata can be separated
Service Source is for deleting a small amount of file, to accelerate the response speed to other business.File deletion is carried out according to above-mentioned steps
It can accelerate the response speed to other customer services while promoting whole deletion speed.
Wherein, to judging whether Metadata Service pressure value reaches the mode of preset value without limitation, such as can be by CPU
Occupancy is determined as Metadata Service pressure value, i.e., determines to reach when CPU usage is high, when CPU usage down to
Judgement is not up to;Can also using file delete operation to Metadata Service bring processing pressure as Metadata Service pressure,
Specifically, it can be determined that whether quantity of documents to be deleted reaches first threshold in queue to be deleted;If so, determining current member
Whether data service pressure reaches preset value;If not, determining that current meta data service pressure is not up to preset value.Pass through the latter
The pressure of Metadata Service is carried out to determine that implementation is simple, it can also be to avoid additional resource overhead.
For after this, first threshold is set as 100, if file to be deleted reaches 100 in queue to be deleted,
Determine that current meta data service pressure is big, file deletion is carried out with lower speed;If at not up to 100, determining current member
Data service pressure is small, then carries out file deletion with higher speed.
Embodiment three:
If the ceaselessly continual delete operation for initiating large amount of small documents of client, even by asynchronous system
Issue Metadata Service, Metadata Service is also required to the time and deletes small documents one by one, the available concurrent energy of Metadata Service
Power is limited, if other normal business will receive influence all for handling delete operation.Except can be deleted
In addition to rate control process, response further can also be deleted by control to reduce Metadata Service pressure.
Specifically, before queue to be deleted is added in file destination, it can further judge the residue of queue to be deleted
Whether capacity is less than second threshold;If so, document retaining removal request, when the residual capacity of queue to be deleted is not less than second
Queue to be deleted is added in file destination according to file deletion requests to be processed when threshold value.
For example, second threshold is set as 10, if queue remaining space to be deleted will face team to be deleted less than 10
Full situation is arranged, deletes speed for control, the response of removal request, queue to be deleted during question paper is deleted can be stopped
The response of removal request is further continued for when remaining space becomes more.
In addition it is also possible to carry out the sound of file deletion requests by the transmission speed for currently deleting speed and request to be deleted
It should control.Specifically, before queue to be deleted being added in file destination, available client receives the speed of file deletion requests
Degree, obtains First Speed;Judge whether First Speed reaches third threshold value;If so, document retaining removal request, when to be deleted
Team to be deleted is added in file destination according to file deletion requests to be processed when the residual capacity of queue is not less than second threshold
Column.
For example, setting third threshold value as 1000/s, after receiving the deletion file request of 1000/s, just stop
The response of removal request not only can satisfy the normal erasure request of user, but also can guarantee other business not and will receive largely to delete
Except Metadata Service obstruction caused by operation, so as to normally provide Metadata Service.
Example IV:
Referring to FIG. 2, Fig. 2 is the structural block diagram that file provided in this embodiment deletes device;The device mainly includes: refer to
Transmission unit 210, prompt output unit 220, queue fills unit 230, file is enabled to delete unit 240 and record deletion unit
250.File provided in this embodiment is deleted device and can mutually be compareed with above-mentioned file delet method.
Wherein, it when instruction sending unit 210 is mainly used for receiving delete target file request, is sent to Metadata Service
Delete feedback instruction;
Prompt output unit 220 is mainly used for output and deletes successfully deletion result prompt information;
Queue fills unit 230 is mainly used for that queue to be deleted for file destination is added;
File is deleted unit 240 and is mainly used for according to default deleting mechanism control Metadata Service to queue Chinese to be deleted
Part executes delete operation;
Record deletion unit 250 is mainly used for when the deletion success feedback information for receiving Metadata Service to file destination
When, by the record information deletion of file destination in queue to be deleted.
File provided in this embodiment, which deletes device, can guarantee to mitigate metadata clothes while deletion business normally executes
The pressure of business.
Optionally, file deletion unit mainly may include:
Pressure judgment sub-unit, for judging whether current meta data service pressure reaches preset value;
First determines subelement, if being not up to preset value for current meta data service pressure, by queue Chinese to be deleted
Part is carried out the response of removal request by First Speed;
Second determines subelement, if reaching preset value for current meta data service pressure, by file in queue to be deleted
The response of removal request is carried out by second speed;Wherein, First Speed is not less than second speed.
Optionally, pressure judgment sub-unit mainly may include:
Judgment sub-unit, for judging whether quantity of documents to be deleted in queue to be deleted reaches first threshold;
Third determines subelement, for determining when quantity of documents to be deleted in queue to be deleted reaches first threshold
Whether current meta data service pressure reaches preset value;
4th determines subelement, for sentencing when quantity of documents to be deleted in queue to be deleted is not up to first threshold
Settled preceding Metadata Service pressure is not up to preset value.
Optionally, file deletion unit is specifically as follows: sequence deletes unit, adds for pressing file in queue to be deleted
Enter sequence successively to delete.
Optionally, file provided in this embodiment, which is deleted in device, may further include capacity judging unit, and capacity is sentenced
Disconnected unit is connect with queue fills unit, for judging whether the residual capacity of queue to be deleted is less than second threshold;If so,
Document retaining removal request is asked when the residual capacity of queue to be deleted is not less than second threshold according to file deletion to be processed
It asks and queue to be deleted is added in file destination.
Embodiment five:
File sweep equipment provided by the present application is introduced below, specifically the introduction of file sweep equipment can refer to
The step of above-mentioned file delet method, the equipment specifically include that
Memory, for storing computer program;
Processor, when for executing computer program the step of realization file delet method.
Referring to FIG. 3, the structural schematic diagram of file sweep equipment provided by the embodiments of the present application, this document sweep equipment can
Bigger difference is generated because configuration or performance are different, may include one or more processors (central
Processing units, CPU) 322 (for example, one or more processors) and memory 332, one or more
Store the storage medium 330 (such as one or more mass memory units) of application program 342 or data 344.Wherein, it deposits
Reservoir 332 and storage medium 330 can be of short duration storage or persistent storage.The program for being stored in storage medium 330 may include
One or more modules (diagram does not mark), each module may include to the series of instructions behaviour in data processing equipment
Make.Further, central processing unit 322 can be set to communicate with storage medium 330, hold on file sweep equipment 301
Series of instructions operation in row storage medium 330.
File sweep equipment 301 can also include one or more power supplys 326, one or more wired or nothings
Wired network interface 350, one or more input/output interfaces 358, and/or, one or more operating systems 341,
Such as Windows ServerTM, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM etc..
Step in file delet method described in above figure 1 can be realized by the structure of file sweep equipment.
Embodiment six:
Readable storage medium storing program for executing provided by the embodiments of the present application is introduced below, readable storage medium storing program for executing described below with
Above-described file delet method can correspond to each other reference.
A kind of readable storage medium storing program for executing disclosed in the present application, is stored thereon with program, and text is realized when program is executed by processor
The step of part delet method.
The readable storage medium storing program for executing be specifically as follows USB flash disk, mobile hard disk, read-only memory (Read-Only Memory,
ROM), the various program storage generations such as random access memory (Random Access Memory, RAM), magnetic or disk
The readable storage medium storing program for executing of code.
It is apparent to those skilled in the art that for convenience and simplicity of description, the device of foregoing description,
The specific work process of equipment, storage medium and unit, can refer to corresponding processes in the foregoing method embodiment, herein no longer
It repeats.
In several embodiments provided herein, it should be understood that disclosed device, system, storage medium and
Method may be implemented in other ways.For example, apparatus embodiments described above are merely indicative, for example, single
Member division, only a kind of logical function partition, there may be another division manner in actual implementation, for example, multiple units or
Component can be combined or can be integrated into another system, or some features can be ignored or not executed.Another point is shown
The mutual coupling, direct-coupling or communication connection shown or discussed can be through some interfaces, between device or unit
Coupling or communication connection are connect, can be electrical property, mechanical or other forms.
Unit may or may not be physically separated as illustrated by the separation member, shown as a unit
Component may or may not be physical unit, it can and it is in one place, or may be distributed over multiple networks
On unit.It can some or all of the units may be selected to achieve the purpose of the solution of this embodiment according to the actual needs.
It, can also be in addition, each functional unit in each embodiment of the application can integrate in one processing unit
It is that each unit physically exists alone, can also be integrated in one unit with two or more units.Above-mentioned integrated list
Member both can take the form of hardware realization, can also realize in the form of software functional units.
It, can if integrated unit is realized in the form of SFU software functional unit and when sold or used as an independent product
To be stored in a mobile terminal.Based on this understanding, the technical solution of the application is substantially in other words to the prior art
The all or part of the part to contribute or the technical solution can be embodied in the form of software products, which deposits
It stores up in one storage medium, including some instructions are used so that a mobile terminal (can be mobile phone or tablet computer
Deng) execute each embodiment method of the application all or part of the steps.And storage medium above-mentioned includes: USB flash disk, moves firmly
Disk, read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM),
The various media that can store program code such as magnetic or disk.
Each embodiment is described in a progressive manner in specification, the highlights of each of the examples are with other realities
The difference of example is applied, the same or similar parts in each embodiment may refer to each other.For device disclosed in embodiment
Speech, since it is corresponded to the methods disclosed in the examples, so being described relatively simple, related place is referring to method part illustration
?.
Professional further appreciates that, unit described in conjunction with the examples disclosed in the embodiments of the present disclosure
And algorithm steps, it can be realized with the combination of electronic hardware, terminal or the two, in order to clearly demonstrate hardware and software
Interchangeability generally describes each exemplary composition and step according to function in the above description.These functions are studied carefully
Unexpectedly it is implemented in hardware or software, the specific application and design constraint depending on technical solution.Professional technique people
Member can use different methods to achieve the described function each specific application, but this realization is it is not considered that super
Scope of the present application out.
The step of method described in conjunction with the examples disclosed in this document or algorithm, can directly be held with hardware, processor
The combination of capable software module or the two is implemented.Software module can be placed in random access memory (RAM), memory, read-only deposit
Reservoir (ROM), electrically programmable ROM, electrically erasable ROM, register, hard disk, moveable magnetic disc, CD-ROM or technology
In any other form of storage medium well known in field.
Detailed Jie has been carried out to file delet method, device, equipment and readable storage medium storing program for executing provided herein above
It continues.Specific examples are used herein to illustrate the principle and implementation manner of the present application, and the explanation of above embodiments is only
It is to be used to help understand the method for this application and its core ideas.It should be pointed out that for those skilled in the art
For, under the premise of not departing from the application principle, can also to the application, some improvement and modification can also be carried out, these improve and repair
Decorations are also fallen into the protection scope of the claim of this application.
Claims (10)
1. a kind of file delet method characterized by comprising
When client receives delete target file request, is sent to Metadata Service and delete feedback instruction;
Output, which is deleted, successfully deletes result prompt information;
Queue to be deleted is added in the file destination;
Metadata Service is controlled according to default deleting mechanism, and delete operation is executed to file in the queue to be deleted;
When receiving deletion success feedback information of the Metadata Service to the file destination, by institute in the queue to be deleted
State the record information deletion of file destination.
2. file delet method as shown in claim 1, which is characterized in that the basis presets deleting mechanism and controls metadata
Service carries out delete operation to file in the queue to be deleted, comprising:
Judge whether current meta data service pressure reaches preset value;
If not up to, file in the queue to be deleted to be carried out to the response of removal request by First Speed;
If had reached, file in the queue to be deleted is carried out to the response of removal request by second speed;Wherein, described
One speed is not less than the second speed.
3. the file delet method as shown in claim 2, which is characterized in that described whether to judge current meta data service pressure
Reach preset value, comprising:
Judge whether quantity of documents to be deleted in the queue to be deleted reaches first threshold;
If so, determining whether current meta data service pressure reaches preset value;
If not, determining that current meta data service pressure is not up to preset value.
4. file delet method as shown in claim 1, which is characterized in that the basis presets deleting mechanism and controls metadata
Service carries out delete operation to file in the queue to be deleted, comprising:
File in the queue to be deleted is successively deleted by addition sequence.
5. the file delet method as shown in any one of Claims 1-4, which is characterized in that be added by the file destination
Before queue to be deleted, further includes:
Judge whether the residual capacity of the queue to be deleted is less than second threshold;
If so, document retaining removal request, when the residual capacity of the queue to be deleted is not less than second threshold according to
The queue to be deleted is added in the file destination by the file deletion requests of processing.
6. a kind of file deletes device characterized by comprising
Instruction sending unit when for receiving delete target file request, sending to Metadata Service and deleting feedback instruction;
Output unit is prompted, successfully deletes result prompt information for exporting to delete;
Queue fills unit, for queue to be deleted to be added in the file destination;
File deletes unit, for being executed according to default deleting mechanism control Metadata Service to file in the queue to be deleted
Delete operation;
Record deletion unit, for inciting somebody to action when receiving deletion successfully feedback information of the Metadata Service to the file destination
The record information deletion of file destination described in the queue to be deleted.
7. the file as shown in claim 6 deletes device, which is characterized in that the file deletes unit and includes:
Pressure judgment sub-unit, for judging whether current meta data service pressure reaches preset value;
First determines subelement, if being not up to preset value for current meta data service pressure, by the queue Chinese to be deleted
Part is carried out the response of removal request by First Speed;
Second determines subelement, if reaching preset value for current meta data service pressure, by file in the queue to be deleted
The response of removal request is carried out by second speed;Wherein, the First Speed is not less than the second speed.
8. the file delet method as shown in claim 7, which is characterized in that the pressure judgment sub-unit includes:
Whether judgment sub-unit, the quantity of documents for judging to be deleted in the queue to be deleted reach first threshold;
Third determines subelement, for determining when quantity of documents to be deleted in the queue to be deleted reaches first threshold
Whether current meta data service pressure reaches preset value;
4th determines subelement, for sentencing when quantity of documents to be deleted in the queue to be deleted is not up to first threshold
Settled preceding Metadata Service pressure is not up to preset value.
9. a kind of file sweep equipment characterized by comprising
Memory, for storing computer program;
Processor realizes the file deletion side as described in claim 1 to 5 any one when for executing the computer program
The step of method.
10. a kind of computer readable storage medium, which is characterized in that be stored with computer on the computer readable storage medium
Program realizes that the file as described in claim 1 to 5 any one is deleted when the computer program is executed by the processor
The step of method.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910434795.XA CN110119387A (en) | 2019-05-23 | 2019-05-23 | A kind of file delet method, device, equipment and readable storage medium storing program for executing |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910434795.XA CN110119387A (en) | 2019-05-23 | 2019-05-23 | A kind of file delet method, device, equipment and readable storage medium storing program for executing |
Publications (1)
Publication Number | Publication Date |
---|---|
CN110119387A true CN110119387A (en) | 2019-08-13 |
Family
ID=67523098
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910434795.XA Pending CN110119387A (en) | 2019-05-23 | 2019-05-23 | A kind of file delet method, device, equipment and readable storage medium storing program for executing |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110119387A (en) |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110750503A (en) * | 2019-09-27 | 2020-02-04 | 浪潮电子信息产业股份有限公司 | File deletion speed control method, device, equipment and readable storage medium |
CN110888844A (en) * | 2019-11-22 | 2020-03-17 | 浪潮电子信息产业股份有限公司 | Data deleting method, system, equipment and computer readable storage medium |
CN111596864A (en) * | 2020-05-22 | 2020-08-28 | 柏科数据技术(深圳)股份有限公司 | Method, device, server and storage medium for data delayed deletion |
CN111625506A (en) * | 2020-05-29 | 2020-09-04 | 浪潮电子信息产业股份有限公司 | Distributed data deleting method, device and equipment based on deleting queue |
CN111813342A (en) * | 2020-07-14 | 2020-10-23 | 济南浪潮数据技术有限公司 | Data recovery method, device, equipment and computer readable storage medium |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7644092B2 (en) * | 2005-05-03 | 2010-01-05 | Kabushiki Kaisha Toshiba | System for managing data on memory device using file system |
CN105095489A (en) * | 2015-08-18 | 2015-11-25 | 浪潮(北京)电子信息产业有限公司 | Distributed file deletion method, device and system |
CN109614377A (en) * | 2018-12-07 | 2019-04-12 | 浪潮电子信息产业股份有限公司 | File delet method, device, equipment and the storage medium of distributed file system |
CN109766317A (en) * | 2019-01-08 | 2019-05-17 | 浪潮电子信息产业股份有限公司 | A kind of delet method of file, device, equipment and storage medium |
-
2019
- 2019-05-23 CN CN201910434795.XA patent/CN110119387A/en active Pending
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7644092B2 (en) * | 2005-05-03 | 2010-01-05 | Kabushiki Kaisha Toshiba | System for managing data on memory device using file system |
CN105095489A (en) * | 2015-08-18 | 2015-11-25 | 浪潮(北京)电子信息产业有限公司 | Distributed file deletion method, device and system |
CN109614377A (en) * | 2018-12-07 | 2019-04-12 | 浪潮电子信息产业股份有限公司 | File delet method, device, equipment and the storage medium of distributed file system |
CN109766317A (en) * | 2019-01-08 | 2019-05-17 | 浪潮电子信息产业股份有限公司 | A kind of delet method of file, device, equipment and storage medium |
Non-Patent Citations (1)
Title |
---|
JAMES QI: "慢速删除大批量文件降低服务器硬盘负载压力", 《JAMES QI的博客》 * |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110750503A (en) * | 2019-09-27 | 2020-02-04 | 浪潮电子信息产业股份有限公司 | File deletion speed control method, device, equipment and readable storage medium |
CN110888844A (en) * | 2019-11-22 | 2020-03-17 | 浪潮电子信息产业股份有限公司 | Data deleting method, system, equipment and computer readable storage medium |
CN111596864A (en) * | 2020-05-22 | 2020-08-28 | 柏科数据技术(深圳)股份有限公司 | Method, device, server and storage medium for data delayed deletion |
CN111625506A (en) * | 2020-05-29 | 2020-09-04 | 浪潮电子信息产业股份有限公司 | Distributed data deleting method, device and equipment based on deleting queue |
CN111813342A (en) * | 2020-07-14 | 2020-10-23 | 济南浪潮数据技术有限公司 | Data recovery method, device, equipment and computer readable storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110119387A (en) | A kind of file delet method, device, equipment and readable storage medium storing program for executing | |
CN104461744B (en) | A kind of resource allocation methods and device | |
JP2020528618A5 (en) | ||
CN109309631A (en) | A kind of method and device based on universal network file system write-in data | |
CN102369688A (en) | Method for adjusting resources dynamically and scheduling device | |
CN107391317A (en) | A kind of method, apparatus of data recovery, equipment and computer-readable recording medium | |
CN104301360A (en) | Method, log server and system for recording log data | |
US20230153141A1 (en) | Cloud cost-based resource development system and method | |
EP3537281B1 (en) | Storage controller and io request processing method | |
CN109085999A (en) | data processing method and processing system | |
CN103916479A (en) | Cloud synchronous local area network accelerating system based on working group document | |
CN109739690B (en) | Backup method and related products | |
CN102685159A (en) | File transmission method and device | |
CN110888844B (en) | Data deleting method, system, equipment and computer readable storage medium | |
CN104793981B (en) | A kind of online snapshot management method and device of cluster virtual machine | |
CN108696911A (en) | A kind of selection method and device of data transmission of internet of things mode | |
CN111666266A (en) | Data migration method and related equipment | |
CN110597912B (en) | Block storage method and device | |
CN108366129B (en) | USB data transmission method, device and USB are from device adapter | |
CN104536852B (en) | Data recovery method and device | |
CN103095759A (en) | Resource environment recovering method and equipment | |
CN106453663B (en) | Improved storage expansion method and device based on cloud service | |
CN107783826B (en) | Virtual machine migration method, device and system | |
CN112925479A (en) | Block chain data management method and device, electronic equipment and medium | |
CN111176559B (en) | Data writing method and device and dual-activity 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 | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20190813 |
|
RJ01 | Rejection of invention patent application after publication |