A file deletion method and device

A file deletion and file technology, applied in the file system, file/folder operation, instrument, etc., can solve problems such as system crashes and burst function call stacks

Active Publication Date: 2020-08-04
GUANGDONG INSPUR BIG DATA RES CO LTD
View PDF17 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0002] The current distributed file system has been applied to various industries, such as: video surveillance, oil exploration, marine monitoring, radio and television media, etc.; in high-performance scenarios such as oil exploration and marine monitoring, a large number of small files will be generated The data is tens of millions of levels. When these data are used, data cleaning operations are required. To delete such a large number of files, use the delete command that comes with the Linux system to achieve the above delete actions through recursive loop calls. It may burst the function call stack and eventually cause the system to crash

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
  • A file deletion method and device
  • A file deletion method and device

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0032] The following will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only some, not all, embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by persons of ordinary skill in the art without making creative efforts belong to the protection scope of the present invention.

[0033] see figure 1 , which shows a flowchart of a file deletion method provided by an embodiment of the present invention, which may include the following steps:

[0034] S11: Obtain a directory to be deleted from the queue of directories to be deleted according to a preset principle as the current directory.

[0035] It should be noted that a queue of directories to be deleted can be maintained. When a directory needs to be deleted, the directory to be dele...

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

The present invention discloses a file deletion method and apparatus. The method comprises: acquiring a to-be-deleted directory from a to-be-deleted directory queue as a current directory according to a preset principle; determining whether the current directory is null, if yes, deleting the directory, and if no, traversing and reading metadata under the current directory, and every time each metadata is read and if a file corresponding to the metadata is determined, deleting the file, and if a directory corresponding to the metadata is determined, using the directory as the current directory and returning to execute the step of determining whether the current directory is null. According to the technical scheme disclosed by the present application, by means of relevant steps of determining the to-be-deleted directory and deleting the corresponding file and by using such a non-recursive cyclic processing mechanism, deletion of the to-be-deleted directory and the corresponding massive files is realized, so that the existing problem in the prior art can be avoided, and while normal operation of the system is ensured, the deletion operation on the massive files is realized.

Description

technical field [0001] The present invention relates to the technical field of distributed file systems, and more specifically, to a file deletion method and device. Background technique [0002] The current distributed file system has been applied to various industries, such as: video surveillance, oil exploration, marine monitoring, radio and television media, etc.; in high-performance scenarios such as oil exploration and marine monitoring, a large number of small files will be generated The data is tens of millions of levels. When these data are used, data cleaning operations are required. To delete such a large number of files, use the delete command that comes with the Linux system to achieve the above delete actions through recursive loop calls. It may burst the function call stack and eventually cause the system to crash. [0003] To sum up, how to provide a technical solution that can realize a massive file deletion operation while ensuring the normal operation of ...

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
Patent Type & Authority Patents(China)
IPC IPC(8): G06F16/16G06F16/182
CPCG06F16/162G06F16/182
Inventor 吕强于鲁宪
Owner GUANGDONG INSPUR BIG DATA RES CO LTD
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products