Method, device and equipment for cleaning recycle bin of distributed file system and medium
By completing the recycling bin cleaning task jointly by the server and the client in the distributed file system, the data transmission amount is reduced, and the problem of excessive IO resources occupied during the recycling bin cleaning process is solved, which improves system performance and efficiency.
Patent Information
- Application Number
- CN202411170684.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-23
- Publication Date
- 2025-01-03
AI Technical Summary
In distributed file systems, the recycling bin cleaning process may occupy a large amount of IO resources, affecting file read and write operations, especially when processing a large number of expired files, the system's response time and throughput will be significantly affected.
Send scan tasks to the client through the server. The client scans and determines the data to be deleted. The directory of the data to be deleted is placed in the queue. The server generates the delete task and transmits it to the client. The client performs the delete operation, thereby reducing the amount of data transmission and saving Bandwidth and reduce network congestion.
The decoupling of recycling bin cleaning is realized, which reduces the processing burden of servers, improves task scheduling and queue management efficiency, significantly reduces the amount of data transmitted on the network, saves bandwidth and reduces the risk of network congestion.
Smart Images

Figure CN119248732A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to a method for cleaning a recycle bin of a distributed file system, a device for cleaning a recycle bin of a distributed file system, an electronic device, and a computer-readable storage medium. Background Art
[0002] In a distributed file system, the Recycle Bin is a very important function, which is mainly used to store documents temporarily deleted by users. Files stored in the Recycle Bin can be restored.
[0003] Distributed file systems need to store massive amounts of data in some application scenarios, so the space utilization requirement is very high. If the recycle bin function is used, the rapid release of disk space is a very important issue.
[0004] If the Recycle Bin cleanup process is not handled properly, a large amount of IO resources may be occupied, thus affecting normal file read and write operations. Especially when processing a large number of expired files, the system response time and throughput may be significantly affected. Summary of the invention
[0005] In view of the above problems, embodiments of the present invention are proposed to provide a distributed file system recycle bin cleaning method, a distributed file system recycle bin cleaning device, an electronic device and a computer-readable storage medium that overcome the above problems or at least partially solve the above problems.
[0006] In order to solve the above problem, an embodiment of the present invention discloses a method for cleaning a recycle bin of a distributed file system, wherein the distributed file system includes a server and at least one client, and the method includes:
[0007] The server sends a scanning task to the client; the scanning task is used to instruct the client to scan the corresponding target data directory in the recycle bin data directory of the server to determine the data to be deleted in the target data directory;
[0008] Receiving the directory of the data to be deleted sent by the client, and putting the directory of the data to be deleted into a queue of data to be deleted;
[0009] A deletion task is generated according to the queue of data to be deleted, and the deletion task is sent to the client; the deletion task is used to instruct the client to delete data corresponding to a directory of the specified data to be deleted.
[0010] Optionally, the server sends a scanning task to the client, including:
[0011] Obtain the recycle bin data directory;
[0012] Determine the target data directory corresponding to the client from the recycle bin data directory;
[0013] Acquire historical information of the client being called to execute the scanning task;
[0014] According to the historical information that the client is called to execute the scanning task, the scanning task for the target data directory is sent to the client.
[0015] Optionally, the obtaining historical information of the client being called to execute the scanning task includes:
[0016] Creating a first counter for the client;
[0017] The first counter is used to record the number of times the client is called to perform the scanning task within a first preset time period; the first preset time period is used to indicate the existence time of the first counter;
[0018] The sending the scanning task for the target data directory to the client according to the historical information that the client is called to execute the scanning task includes:
[0019] Determine a first candidate client whose number of times of being called to perform the scanning task within a preset time period is less than a first threshold; the first threshold is used to indicate an upper limit number of times the client performs the scanning task within the first preset time period;
[0020] Determining a first target client from the first candidate clients according to the number of times the first candidate clients are called to perform the scanning task within a preset time period;
[0021] The scanning task is sent to the first target client.
[0022] Optionally, placing the directory of the data to be deleted into a queue of data to be deleted includes:
[0023] Obtaining the expiration time of the directory of the data to be deleted;
[0024] According to the expiration time of the directory of the data to be deleted, the directory of the data to be deleted is sorted in descending order;
[0025] The sorted directory of the data to be deleted is put into the queue of data to be deleted.
[0026] Optionally, sending the deletion task to the client includes:
[0027] Obtaining historical information of the client being called to execute the deletion task;
[0028] The deletion task is sent to the client according to the historical information that the client is called to execute the deletion task.
[0029] Optionally, the obtaining historical information of the client being called to execute the deletion task includes:
[0030] Creating a second counter for the client;
[0031] The second counter is used to record the number of times the client is called to execute the deletion task within a second preset time period; the second preset time period is used to indicate the existence time of the second counter;
[0032] The sending the deletion task to the client according to the historical information that the client is called to execute the deletion task includes:
[0033] Determine a second candidate client whose number of times of being called to execute the deletion task within the second preset time period is less than a second threshold; the second threshold is used to indicate an upper limit of the number of times the client executes the deletion task within the second preset time period;
[0034] Determining a second target client from the second candidate clients according to the number of times the second candidate clients are called to perform the deletion task within a second preset time period;
[0035] The deletion task is sent to the second target client.
[0036] The embodiment of the present invention further discloses a method for cleaning a recycle bin of a distributed file system, wherein the distributed file system includes a server and at least one client, and the method includes:
[0037] The client receives the scanning task sent by the server;
[0038] According to the scanning task, scanning the target data directory corresponding to the client in the recycle bin data directory of the server, and determining the data to be deleted in the target data directory;
[0039] Determine the directory of the data to be deleted, and send the directory of the data to be deleted to the server;
[0040] receiving a deletion task sent by the server; the deletion task is generated by the server according to the directory of the data to be deleted;
[0041] According to the deletion task, the data corresponding to the directory of the specified data to be deleted is deleted.
[0042] Optionally, determining the data to be deleted in the target data directory includes:
[0043] Obtaining the timestamp of the data in the target data directory;
[0044] Determine whether the data in the target data directory is expired according to the timestamp of the data in the target data directory;
[0045] The expired data in the target data directory is determined as data to be deleted.
[0046] Optionally, deleting data corresponding to a directory of specified data to be deleted according to the deletion task includes:
[0047] Traversing the to-be-deleted directory indicated by the deletion task, and determining the data corresponding to the to-be-deleted directory indicated by the deletion task;
[0048] Obtaining the number of files deleted by the client within a preset deletion threshold time period;
[0049] Compare the number of files deleted by the preset client within a preset deletion threshold time period with a preset deletion file number threshold;
[0050] If the number of files deleted by the preset client within the preset deletion threshold time period is less than the deletion file number threshold, deleting the data corresponding to the to-be-deleted directory indicated by the deletion task;
[0051] If the number of files deleted by the preset client within the preset deletion threshold time period is greater than the deletion file number threshold, then traversing the to-be-deleted directory indicated by the deletion task is stopped.
[0052] The embodiment of the present invention further discloses a recycle bin cleaning device for a distributed file system, wherein the distributed file system includes a server and at least one client, and the device is applied to the server, and includes:
[0053] A scanning task sending module, used to send a scanning task to the client; the scanning task is used to instruct the client to scan the corresponding target data directory in the recycle bin data directory of the server to determine the data to be deleted in the target data directory;
[0054] A queue processing module, used for receiving the directory of the data to be deleted sent by the client, and putting the directory of the data to be deleted into a queue of data to be deleted;
[0055] The deletion task sending module is used to generate a deletion task according to the to-be-deleted data queue and send the deletion task to the client; the deletion task is used to instruct the client to delete the data corresponding to the directory of the specified to-be-deleted data.
[0056] Optionally, the scanning task sending module includes:
[0057] A shared directory acquisition submodule, used to acquire the recycle bin data directory;
[0058] A target directory determination submodule, used to determine a target data directory corresponding to the client from the recycle bin data directory;
[0059] A first history information acquisition submodule is used to acquire history information of the client being called to execute the scanning task;
[0060] The scanning task sending submodule is used to send the scanning task for the target data directory to the client according to the historical information of the client being called to execute the scanning task.
[0061] Optionally, the first historical information acquisition submodule includes:
[0062] A first counter creating unit, configured to create a first counter for the client;
[0063] A first recording unit, configured to record, through the first counter, the number of times the client is called to perform the scanning task within a first preset time period; the first preset time period is used to indicate the existence time of the first counter;
[0064] The scanning task sending submodule includes:
[0065] A first candidate determination unit, used to determine a first candidate client whose number of times of being called to perform the scanning task within a preset time period is less than a first threshold; the first threshold is used to indicate an upper limit number of times the client performs the scanning task within the first preset time period;
[0066] A first target determination unit, configured to determine a first target client from among the first candidate clients according to the number of times the first candidate clients are called to perform the scanning task within a preset time period;
[0067] A scanning task sending unit is used to send the scanning task to the first target client.
[0068] Optionally, the queue processing module includes:
[0069] An expiration time acquisition submodule is used to acquire the expiration time of the directory of the data to be deleted;
[0070] A sorting submodule, used to sort the directory of the data to be deleted in descending order according to the expiration time of the directory of the data to be deleted;
[0071] The queue placing submodule is used to place the directory of the data to be deleted after sorting into the queue of data to be deleted.
[0072] Optionally, the deletion task sending module includes:
[0073] A second history information acquisition submodule is used to acquire history information of the client being called to execute the deletion task;
[0074] The deletion task sending submodule is used to send the deletion task to the client according to the historical information of the client being called to execute the deletion task.
[0075] Optionally, the second historical information acquisition submodule includes:
[0076] A second counter creating unit, configured to create a second counter for the client;
[0077] A second recording unit, configured to record, through the second counter, the number of times the client is called to perform the deletion task within a second preset time period; the second preset time period is used to indicate the existence time of the second counter;
[0078] The deletion task sending submodule includes:
[0079] A second candidate determination unit is used to determine a second candidate client whose number of times of being called to execute the deletion task within the second preset time period is less than a second threshold; the second threshold is used to indicate an upper limit of the number of times the client executes the deletion task within the second preset time period;
[0080] A second target determination unit, configured to determine a second target client from the second candidate clients according to the number of times the second candidate clients are called to perform the deletion task within a second preset time period;
[0081] A deletion task sending unit is used to send the deletion task to the second target client.
[0082] The embodiment of the present invention further discloses a recycle bin cleaning device for a distributed file system, wherein the distributed file system includes a server and at least one client, and the device is applied to the client, and includes:
[0083] A scanning task receiving module, used for receiving the scanning task sent by the server;
[0084] A to-be-deleted data determination module, configured to scan a target data directory corresponding to the client in the recycle bin data directory of the server according to the scanning task, and determine the to-be-deleted data in the target data directory;
[0085] A directory sending module, used for determining the directory of the data to be deleted and sending the directory of the data to be deleted to the server;
[0086] A deletion task receiving module, used for receiving a deletion task sent by the server; the deletion task is generated by the server according to the directory of the data to be deleted;
[0087] The data deletion module is used to delete the data corresponding to the directory of the specified data to be deleted according to the deletion task.
[0088] Optionally, the to-be-deleted data determination module includes:
[0089] A timestamp acquisition submodule, used to acquire the timestamp of the data in the target data directory;
[0090] An expired data determination submodule, used to determine whether the data in the target data directory is expired according to the timestamp of the data in the target data directory;
[0091] The to-be-deleted data determination submodule is used to determine the expired data in the target data directory as the to-be-deleted data.
[0092] Optionally, the data deletion module includes:
[0093] A traversal submodule, used to traverse the directory to be deleted indicated by the deletion task, and determine the data corresponding to the directory to be deleted indicated by the deletion task;
[0094] A quantity acquisition submodule is used to acquire the number of files deleted by the client within a preset deletion threshold time period;
[0095] A quantity comparison submodule, used to compare the number of files deleted by the preset client within a preset deletion threshold time period with a preset deletion file quantity threshold;
[0096] A deletion submodule, configured to delete the data corresponding to the directory to be deleted indicated by the deletion task if the number of files deleted by the preset client within the preset deletion threshold time period is less than the deletion file number threshold;
[0097] The stop submodule is used to stop traversing the to-be-deleted directory indicated by the deletion task if the number of files deleted by the preset client within the preset deletion threshold time period is greater than the deletion file number threshold.
[0098] An embodiment of the present invention also discloses an electronic device, comprising: a processor, a memory, and a computer program stored in the memory and capable of running on the processor, wherein when the computer program is executed by the processor, the steps of the recycle bin cleaning method of the distributed file system are implemented as described above.
[0099] The embodiment of the present invention further discloses a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the recycle bin cleaning method of the distributed file system are implemented.
[0100] The beneficial effects of the embodiments of the present invention are:
[0101] The embodiment of the present invention realizes the decoupling of the cleanup work of the recycle bin in the distributed file system by having the server and the client jointly complete the recycle bin cleanup task. By sending the scanning task from the server to the client, the server can reduce its own processing burden, thereby focusing more on task scheduling and queue management; the server receives the directory of the data to be deleted sent by the client, and puts the directory of the data to be deleted into the queue of data to be deleted; the server generates a deletion task according to the queue of data to be deleted, and sends the deletion task to the client, thereby achieving the effect of directly transmitting the directory instead of the data itself. The amount of data transmitted in the network when performing the recycle bin cleanup work can be significantly reduced, thereby saving bandwidth resources and reducing the risk of network congestion. BRIEF DESCRIPTION OF THE DRAWINGS
[0102] Figure 1 It is a flow chart of steps of a method for cleaning a recycle bin of a distributed file system of the present invention;
[0103] Figure 2 It is a flowchart of the steps of another method for cleaning the recycle bin of a distributed file system of the present invention;
[0104] Figure 3 is a schematic diagram of a process for managing a recycle bin cleaning task in one embodiment of the present invention;
[0105] Figure 4 It is a schematic diagram of a process of scanning and deleting nodes of a recycle bin data in one embodiment of the present invention;
[0106] Figure 5 It is a flow chart of a recycle bin scanning and deletion flow control mechanism in one embodiment of the present invention;
[0107] Figure 6 It is a structural block diagram of a recycle bin cleaning device for a distributed file system provided by an embodiment of the present invention;
[0108] Figure 7 It is a structural block diagram of another distributed file system recycle bin cleaning device provided by an embodiment of the present invention;
[0109] Figure 8 is a structural block diagram of an electronic device provided by an embodiment of the present invention;
[0110] Fig. 9 It is a structural block diagram of a computer-readable storage medium provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0111] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the present invention is further described in detail below with reference to the accompanying drawings and specific embodiments.
[0112] Reference Figure 1 , shows a flowchart of a method for cleaning a recycle bin of a distributed file system according to the present invention, wherein the method may specifically include the following steps:
[0113] Step 101, the server sends a scanning task to the client; the scanning task is used to instruct the client to scan the corresponding target data directory in the recycle bin data directory of the server to determine the data to be deleted in the target data directory;
[0114] A distributed file system is a file system that stores files on multiple nodes in a distributed manner through a computer network. The nodes include servers and clients. This system allows users to access and manage shared files distributed on the network as easily as accessing local files, without having to worry about the specific storage location of the data; nodes include servers and clients. The recycle bin of a distributed file system is a logical storage space used to temporarily store files or directories deleted by user client nodes. It is similar to the recycle bin in a stand-alone system, but it needs to process data distributed on multiple nodes in the network. The recycle bin data directory stores the directory of deleted data in the distributed file system, and the recycle bin data directory is stored in the server.
[0115] In the embodiment of the present invention, a scanning task can be sent to multiple clients for recycle bin cleaning through a server; for clients with different performance, the corresponding scanning tasks are also different. Among them, the scanning task can include a data directory that needs to be scanned by the client; in addition to the different data directories that need to be scanned, the difference in scanning tasks may also include the size of the scanning task, the complexity, etc.
[0116] In one embodiment, step 101 may include the following sub-steps:
[0117] Sub-step S11, obtaining the data directory of the recycle bin;
[0118] Sub-step S12, determining a target data directory corresponding to the client from the recycle bin data directory;
[0119] The target data directory to be sent to the client can be dynamically determined based on the client's performance;
[0120] Sub-step S13, obtaining historical information of the client being called to execute the scanning task;
[0121] The historical information of the scanning task is the execution status of the scanning task by the client within a certain period of time; the historical information can be passively or actively reported to the server by each client when the scanning task is completed or when the preset scanning task reporting time is reached.
[0122] In one embodiment, the sub-step S13 may further include:
[0123] Sub-step S131, creating a first counter for the client;
[0124] The server creates a first counter for each client. The first counter uses the client ID and the time corresponding to the creation of the counter as a key; it can be expressed as {scan_clientId}_{yyyyMMddHHmm}; the count of the first counter is used to indicate the specific number of times the client corresponding to the first counter is called to perform the scanning task between the time the first counter is created and the current time.
[0125] Sub-step S132, recording, by means of the first counter, the number of times the client is called to perform the scanning task within a first preset time period; the first preset time period is used to indicate the existence time of the first counter;
[0126] The count of the first counter is used to indicate the specific number of times the client corresponding to the first counter is called to perform the scanning task between the moment the first counter is created and the current moment. The existence time of the first counter is determined by the preset existence time of the first counter; and the preset existence time of the first counter can be dynamically adjusted according to business needs, the performance of the distributed file system cluster, and the current load of the distributed system cluster.
[0127] When the first counter exceeds the preset existence time, it will be considered to be about to expire. The server will create a new first counter based on the current time. When all the scanning tasks recorded by the first counter that is about to expire are completed, the status of the first counter that is about to expire will be changed to expired and destroyed.
[0128] Sub-step S14: sending a scan task for the target data directory to the client according to the historical information of the client being called to execute the scan task.
[0129] The server may send the scanning task to the client according to the number of times the corresponding client is called to perform the scanning task recorded by the first counter.
[0130] In one embodiment, the sub-step S14 may further include:
[0131] Sub-step S141, determining a first candidate client whose number of times of being called to perform the scanning task within a preset time period is less than a first threshold; the first threshold is used to indicate an upper limit number of times the client performs the scanning task within the first preset time period;
[0132] The server will determine whether the client can be used as a candidate client for distributing scanning tasks based on the number of times the client is called to perform scanning tasks recorded by the first counter and the comparison result with the preset client scanning task threshold, and put each client that can be a candidate client into the scanning task candidate pool; the preset client scanning task threshold can be adjusted according to the performance of each client.
[0133] Sub-step S142, determining a first target client from the first candidate clients according to the number of times the first candidate clients are called to perform the scanning task within a preset time period;
[0134] After determining the candidate pool of scanning tasks, the server will comprehensively compare the values of the first counters corresponding to all candidate clients in the candidate pool, sort them in ascending order, and select the candidate client with the lowest value of the first counter as the target client to issue the scanning task.
[0135] In one embodiment, each client can be grouped according to performance, and the grouping information can be recorded in the client id, such as scan_clientId_X. When the server makes comparison, the preset client scanning task threshold corresponding to the client group is selected for comparison to obtain different candidate client groups, dynamically adjust the size of the scanning task, and issue scanning tasks in a targeted manner; in this way, the performance differences between each client can be fully utilized to reduce the scanning pressure of the recycle bin cleanup of the distributed system; when in the current scanning task candidate pool, there are more than one clients whose corresponding first counter values are the same minimum value, the server will randomly select one of the candidate clients as the target client.
[0136] Sub-step S143: sending the scanning task to the first target client.
[0137] Step 102, receiving the directory of the data to be deleted sent by the client, and putting the directory of the data to be deleted into a queue of data to be deleted;
[0138] To ensure the bandwidth of network transmission in the distributed file system, the client will send the directory of the data to be deleted to the server after completing the scanning task; the server will organize the directory of the data to be deleted sent by the client and put it into the queue of data to be deleted; thereby decoupling the system components, buffering the data flow, and realizing task scheduling.
[0139] In one embodiment, step 102 may include the following sub-steps:
[0140] Sub-step S21, obtaining the expiration time of the directory of the data to be deleted;
[0141] After receiving the directory of the data to be deleted sent by the client, the server will obtain the expiration time carried in the directory of the data to be deleted. The expiration time may include the expired time and the total generated time.
[0142] Sub-step S22, sorting the directories of the data to be deleted in descending order according to the expiration times of the directories of the data to be deleted;
[0143] Sub-step S23, putting the sorted directory of the data to be deleted into a queue of data to be deleted.
[0144] In the above embodiment, by putting the to-be-deleted data directory into the to-be-deleted data queue, task scheduling can be better implemented to ensure the orderliness of the to-be-deleted data.
[0145] Step 103: Generate a deletion task according to the to-be-deleted data queue, and send the deletion task to the client; the deletion task is used to instruct the client to delete data corresponding to a directory of the specified to-be-deleted data.
[0146] In a distributed file system, when the system receives a request for data to be deleted and builds a queue of data to be deleted, it usually further processes these requests to generate deletion tasks and sends these tasks to the client or service, process, etc. responsible for recycle bin cleanup; the deletion task will at least include the directory path of the data to be deleted, and may also include other parameters such as the identity information of the task executor, task priority, task execution timestamp or deadline.
[0147] In one embodiment, step 103 may include the following sub-steps:
[0148] Sub-step S31, obtaining historical information of the client being called to execute the deletion task;
[0149] The historical information of the client being called to execute the deletion task includes: the number of times the client is called to execute the deletion task.
[0150] In one embodiment, the sub-step S31 may further include:
[0151] Sub-step S311, creating a second counter for the client;
[0152] The server creates a second counter for each client, and the second counter uses the client ID and the time corresponding to the creation of the counter as a key; the key of the counter can be expressed as {delete_clientId}_{yyyyMMddHHmm}.
[0153] In one embodiment, each client can be grouped according to performance, and the grouping information can be recorded in the client id, such as delete_clientId_X. When the server makes comparison, the preset client deletion task threshold corresponding to the client group is selected for comparison to obtain different candidate client groups, and targeted deletion tasks are issued; in this way, the performance differences between the various clients are fully utilized to reduce the deletion pressure of the recycle bin cleanup of the distributed system.
[0154] Sub-step S312: recording, by means of the second counter, the number of times the client is called to execute the deletion task within a second preset time period; the second preset time period is used to indicate the existence time of the second counter;
[0155] The count of the second counter is used to indicate the specific number of times the client corresponding to the second counter is called to execute the deletion task between the time when the second counter is created and the current time.
[0156] The existence time of the second counter is determined by the existence time of the preset second counter; the existence time of the preset second counter can be dynamically adjusted according to business needs, the performance of the distributed file system cluster, and the current load of the distributed system cluster.
[0157] In one embodiment, when the second counter exceeds the preset existence time, it will be considered to be about to expire. The server will create a new second counter based on the current time. When all deletion tasks of the records of the second counter that is about to expire are completed, the status of the second counter that is about to expire will be changed to expired and destroyed.
[0158] Sub-step S32: sending the deletion task to the client according to the historical information of the client being called to execute the deletion task.
[0159] In a distributed system, sending a new deletion task to a client based on historical information of the client being called to execute deletion tasks involves evaluating the client's performance and reliability, as well as optimizing task allocation.
[0160] In one embodiment, the sub-step S32 may further include:
[0161] Sub-step S321, determining a second candidate client whose number of times of being called to execute the deletion task within the second preset time period is less than a second threshold; the second threshold is used to indicate an upper limit of the number of times the client executes the deletion task within the second preset time period;
[0162] The server determines whether the client can be used as a candidate client for distributing the deletion task based on the number of times the corresponding client is called to execute the deletion task recorded by the second counter and the comparison result with the preset client deletion task threshold, and puts each client that can be a candidate client into a deletion task candidate pool; the preset client deletion task threshold can be adjusted according to the performance of each client.
[0163] Sub-step S322, determining a second target client from the second candidate clients according to the number of times the second candidate clients are called to perform the deletion task within a second preset time period;
[0164] After determining the candidate pool for deletion tasks, the server will comprehensively compare the values of the second counters corresponding to all candidate clients in the task candidate pool, sort them in ascending order, and select the candidate client with the lowest value of the second counter as the target client to issue the deletion task, thereby ensuring the load balancing of the deletion tasks of the distributed file system.
[0165] In one embodiment, when there are more than one clients in the current deletion task candidate pool whose corresponding second counter values are the same minimum value, the server will randomly select one of the candidate clients as the target client and issue the deletion task.
[0166] Sub-step S323: sending the deletion task to the second target client.
[0167] In the above embodiment, the decoupling of the recycle bin cleaning work in the distributed file system is achieved by the server and the client jointly completing the recycle bin cleaning task. By sending the scanning task from the server to the client, the server can reduce its own processing burden, so that it can focus more on task scheduling and queue management; the server receives the directory of the data to be deleted sent by the client, and puts the directory of the data to be deleted into the queue of data to be deleted; the server generates a deletion task according to the queue of data to be deleted, and sends the deletion task to the client, so as to achieve the effect of directly transmitting the directory instead of the data itself. The amount of data transmitted in the network when performing the recycle bin cleaning work can be significantly reduced, thereby saving bandwidth resources and reducing the risk of network congestion.
[0168] Reference Figure 2, shows a flowchart of steps of another method for cleaning the recycle bin of a distributed file system of the present invention, wherein the distributed file system includes a server and at least one client, and the method may specifically include the following steps:
[0169] Step 201: The client receives a scanning task sent by the server.
[0170] Step 202, according to the scanning task, scanning the target data directory corresponding to the client in the recycle bin data directory of the server, and determining the data to be deleted in the target data directory;
[0171] In a distributed file system, it is usually necessary to scan a target data directory corresponding to a client in a server recycle bin data directory according to a scanning task to determine the data to be deleted therein.
[0172] In one embodiment, step 202 may include the following sub-steps:
[0173] Sub-step S41, obtaining the timestamp of the data in the target data directory;
[0174] The client reads the timestamp of the data in the target data directory by traversing the recursive target data directory. The timestamp is the generation timestamp of the data in the target data directory.
[0175] In one embodiment, the client constructs a timestamp directory of the data to be deleted based on the acquired timestamp and the target data directory indicated in the scanning task;
[0176] Sub-step S42, determining whether the data in the target data directory is expired according to the timestamp of the data in the target data directory;
[0177] The client calculates whether the data file has expired by using timestamp information and a preset expiration threshold. The preset expiration threshold can be adjusted according to business needs. Flexible selection of timestamps can meet more calculation situations.
[0178] Sub-step S43, determining the expired data in the target data directory as data to be deleted;
[0179] Step 203, determining the directory of the data to be deleted, and sending the directory of the data to be deleted to the server;
[0180] The client will send the directory of data to be deleted scanned by the heartbeat time to the server along with the heartbeat mechanism; the sending mechanism can be other passive or active sending methods.
[0181] In one embodiment, the information sent to the server includes scanning status information in addition to the directory of data to be deleted. The specific content of the scanning status information may be the number of files scanned within the heartbeat time, the number of directories of data to be deleted scanned, the number of scanned files remaining to be scanned at the time of reporting, etc., so that the server can be aware of the scanning dynamics more timely and make corresponding adjustments.
[0182] Step 204, receiving a deletion task sent by the server; the deletion task is generated by the server according to the directory of the data to be deleted.
[0183] Step 205, deleting the data corresponding to the directory of the specified data to be deleted according to the deletion task;
[0184] In a distributed file system, the client scans and determines the data to be deleted according to the specific content of the deletion task sent by the server, such as the path of the data directory to be deleted.
[0185] In one embodiment, step 205 may include the following sub-steps:
[0186] Sub-step S51, traversing the directory to be deleted indicated by the deletion task, and determining the data corresponding to the directory to be deleted indicated by the deletion task;
[0187] The client will traverse and obtain the data to be deleted indicated by the deletion task.
[0188] Sub-step S52, obtaining the number of files deleted by the client within a preset deletion threshold time period.
[0189] Sub-step S53, comparing the number of files deleted by the preset client within a preset deletion threshold time period with a preset deletion file number threshold;
[0190] The preset deletion threshold time period can be adjusted according to demand; after obtaining the data file of the data to be deleted, the recycle bin client will confirm the status of the current file deletion task and compare it with the preset file deletion task threshold.
[0191] In one embodiment, the status of the current file deletion task may include the number of deleted files and the total size of deleted files, etc. The preset file deletion task threshold may be at least one of the deleted file number threshold and the deleted file total size threshold. By reasonably designing the threshold of the file deletion task, the efficiency of the file deletion task can be better improved.
[0192] Sub-step S54, if the number of files deleted by the preset client within the preset deletion threshold time period is less than the deletion file number threshold, deleting the data corresponding to the to-be-deleted directory indicated by the deletion task;
[0193] If the number of files deleted by the client within the preset deletion threshold time period is less than the deletion file number threshold, it means that the client is currently in good condition and the access pressure on the metadata in the server is still within the normal value, and the file deletion operation can be performed.
[0194] Sub-step S55, if the number of files deleted by the preset client within the preset deletion threshold time period is greater than the deletion file number threshold, then stop traversing the to-be-deleted directory indicated by the deletion task;
[0195] If the number of files deleted by the client within the preset deletion threshold time period is less than the deletion file number threshold, it means that the client is currently close to overload or other states, and the access pressure on the metadata in the server is greater than the normal value. At this time, in order to ensure the operation of the distributed file system, the execution of the deletion task will be suspended, and the execution of the scanning deletion task will be stopped at the same time.
[0196] In one embodiment, after stopping the execution of the corresponding task, the client will send the deletion task status before stopping the traversal and sorting to the server; the deletion task status can be the number of deleted file tasks, the remaining number of file tasks to be deleted, and the time consumed by the deleted file tasks, etc. The sending method can be reported according to the heartbeat, or it can be adjusted according to the business, which can realize business implementation more flexibly.
[0197] In one embodiment, after reaching the threshold of the number of deleted files and stopping the traversal and sorting of the current data directory to be deleted, the system can resume the traversal and sorting process based on preset conditions. The preset conditions include reaching a preset time interval, or the metadata access pressure is reduced to a certain value. Based on this method, the system can arrange resources more reasonably and improve work efficiency.
[0198] In the above embodiment, by scanning the target data directory corresponding to the client in the recycle bin data directory of the server according to the scanning task, determining the data to be deleted in the target data directory can more accurately identify the data to be deleted. By sending the directory of the data to be deleted instead of the data to the server, the pressure of data transmission is reduced and the utilization of resources is optimized.
[0199] It should be noted that, for the sake of simplicity, the method embodiments are described as a series of action combinations, but those skilled in the art should be aware that the embodiments of the present invention are not limited by the order of the actions described, because according to the embodiments of the present invention, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions involved are not necessarily required by the embodiments of the present invention.
[0200] In order to enable those skilled in the art to better understand the embodiments of the present invention, the embodiments of the present invention are described below by using an example:
[0201] refer to Figure 3 The figure is a schematic diagram of the process of managing the recycle bin cleaning task in one embodiment of the present invention.
[0202] The server includes a cache module, a task distribution module, a flow control module and a progress and status management process.
[0203] When the server starts the recycle bin cleaning service in the cache module, the server will load the configuration file, load the recycle bin data directory into the cache, and perform other operations.
[0204] After the recycle bin cleaning service is started, the task distribution module will periodically pull the recycle bin data directory from the cache module, organize the pulled data into scanning tasks, and distribute them to each client.
[0205] After receiving and completing the scanning task, each client will add the scanned data to be deleted to the queue to be deleted, and the server will sort the data in the queue to be deleted in the cache module.
[0206] The task distribution module pulls the data in the queue for deletion. After the traffic control module detects whether the deletion status of the client meets the deletion threshold, the data in the queue for deletion is sorted into deletion tasks and distributed to each client with the assistance of the traffic control module.
[0207] Each client will report the deletion progress to the server, and the server will save the deletion progress in the cache module, and generate a deletion status report of the data directory to be deleted and report it to the progress and status management process.
[0208] refer to Figure 4 The figure is a schematic diagram of a process of scanning and deleting nodes of a recycle bin data in one embodiment of the present invention.
[0209] The client includes a scanning module and a deletion module; the server includes a progress status node and a metadata service located in the server; the heartbeat module is reflected in both the client and the server;
[0210] When receiving a scan task determined according to the recycle bin data directory, creating a timestamp directory of the data to be deleted according to the timestamp of the target data indicated by the scan task;
[0211] Traverse and determine whether the timestamp of the corresponding directory in the timestamp directory meets the conditions to be deleted; use the directory that meets the conditions to be deleted as the directory of the data to be deleted and send it to the server with the heartbeat mechanism.
[0212] When receiving a deletion task determined according to the queue to be deleted, the subdirectories and files in the data directory to be deleted indicated by the deletion task are traversed, and the traversed files or directories will be monitored by the flow control node, and the flow control node will take out the traversed files or directories to be deleted and hand them over to the deletion module for deletion. The deletion module completes the deletion of files or directories by interacting with the metadata service;
[0213] At the same time, the deletion module will send the deletion information to the server through the heartbeat module along with the heartbeat mechanism;
[0214] refer to Figure 5 The figure is a flow chart of a recycle bin scanning and deletion flow control mechanism in one embodiment of the present invention.
[0215] When an instruction to delete a file or directory is received, it will first confirm whether the current client has reached the preset deletion threshold. If it has, an error will be returned. If it has not, the count of the second counter maintained at the current moment will be increased by one; when the preset survival time of the second counter is exceeded, a new second counter will be created, and the old second counter will be cleared after the corresponding deletion task is completed in the old second counter.
[0216] Reference Figure 6 , shows a structural block diagram of a recycle bin cleaning device for a distributed file system provided by an embodiment of the present invention, the distributed file system includes a server and at least one client, the device is applied to the server, and the device may specifically include the following modules:
[0217] The scanning task sending module 301 is used to send a scanning task to the client; the scanning task is used to instruct the client to scan the corresponding target data directory in the recycle bin data directory of the server to determine the data to be deleted in the target data directory;
[0218] The queue processing module 302 is used to receive the directory of the data to be deleted sent by the client, and put the directory of the data to be deleted into the queue of data to be deleted;
[0219] The deletion task sending module 303 is used to generate a deletion task according to the to-be-deleted data queue and send the deletion task to the client; the deletion task is used to instruct the client to delete the data corresponding to the directory of the specified to-be-deleted data.
[0220] In one embodiment, the scanning task sending module includes:
[0221] A shared directory acquisition submodule, used to acquire the recycle bin data directory;
[0222] A target directory determination submodule, used to determine a target data directory corresponding to the client from the recycle bin data directory;
[0223] A first history information acquisition submodule is used to acquire history information of the client being called to execute the scanning task;
[0224] The scanning task sending submodule is used to send the scanning task for the target data directory to the client according to the historical information of the client being called to execute the scanning task.
[0225] In one embodiment, the first historical information acquisition submodule includes:
[0226] A first counter creating unit, configured to create a first counter for the client;
[0227] A first recording unit, configured to record, through the first counter, the number of times the client is called to perform the scanning task within a first preset time period; the first preset time period is used to indicate the existence time of the first counter;
[0228] The scanning task sending submodule includes:
[0229] A first candidate determination unit, used to determine a first candidate client whose number of times of being called to perform the scanning task within a preset time period is less than a first threshold; the first threshold is used to indicate an upper limit number of times the client performs the scanning task within the first preset time period;
[0230] A first target determination unit, configured to determine a first target client from among the first candidate clients according to the number of times the first candidate clients are called to perform the scanning task within a preset time period;
[0231] A scanning task sending unit is used to send the scanning task to the first target client.
[0232] In one embodiment, the queue processing module includes:
[0233] An expiration time acquisition submodule is used to acquire the expiration time of the directory of the data to be deleted;
[0234] A sorting submodule, used to sort the directory of the data to be deleted in descending order according to the expiration time of the directory of the data to be deleted;
[0235] The queue placing submodule is used to place the directory of the data to be deleted after sorting into the queue of data to be deleted.
[0236] In one embodiment, the deletion task sending module includes:
[0237] A second history information acquisition submodule is used to acquire history information of the client being called to execute the deletion task;
[0238] The deletion task sending submodule is used to send the deletion task to the client according to the historical information of the client being called to execute the deletion task.
[0239] In one embodiment, the second historical information acquisition submodule includes:
[0240] A second counter creating unit, configured to create a second counter for the client;
[0241] A second recording unit, configured to record, through the second counter, the number of times the client is called to perform the deletion task within a second preset time period; the second preset time period is used to indicate the existence time of the second counter;
[0242] The deletion task sending submodule includes:
[0243] A second candidate determination unit is used to determine a second candidate client whose number of times of being called to execute the deletion task within the second preset time period is less than a second threshold; the second threshold is used to indicate an upper limit of the number of times the client executes the deletion task within the second preset time period;
[0244] A second target determination unit, configured to determine a second target client from the second candidate clients according to the number of times the second candidate clients are called to perform the deletion task within a second preset time period;
[0245] A deletion task sending unit is used to send the deletion task to the second target client.
[0246] In the above embodiment, the decoupling of the recycle bin cleaning work in the distributed file system is achieved by the server and the client jointly completing the recycle bin cleaning task. By sending the scanning task from the server to the client, the server can reduce its own processing burden, so that it can focus more on task scheduling and queue management; the server receives the directory of the data to be deleted sent by the client, and puts the directory of the data to be deleted into the queue of data to be deleted; the server generates a deletion task according to the queue of data to be deleted, and sends the deletion task to the client, so as to achieve the effect of directly transmitting the directory instead of the data itself. The amount of data transmitted in the network when performing the recycle bin cleaning work can be significantly reduced, thereby saving bandwidth resources and reducing the risk of network congestion.
[0247] Reference Figure 7, shows a structural block diagram of another distributed file system recycle bin cleaning device provided by an embodiment of the present invention, the distributed file system includes a server and at least one client, the device is applied to the client, and the device may specifically include the following modules:
[0248] The scanning task receiving module 401 is used to receive the scanning task sent by the server;
[0249] The to-be-deleted data determination module 402 is configured to scan the target data directory corresponding to the client in the recycle bin data directory of the server according to the scanning task, and determine the to-be-deleted data in the target data directory;
[0250] A directory sending module 403, used to determine the directory of the data to be deleted, and send the directory of the data to be deleted to the server;
[0251] A deletion task receiving module 404 is used to receive a deletion task sent by the server; the deletion task is generated by the server according to the directory of the data to be deleted;
[0252] The data deletion module 405 is used to delete the data corresponding to the directory of the specified data to be deleted according to the deletion task.
[0253] In one embodiment, the module for determining data to be deleted includes:
[0254] A timestamp acquisition submodule, used to acquire the timestamp of the data in the target data directory;
[0255] An expired data determination submodule, used to determine whether the data in the target data directory is expired according to the timestamp of the data in the target data directory;
[0256] The to-be-deleted data determination submodule is used to determine the expired data in the target data directory as the to-be-deleted data.
[0257] In one embodiment, the data deletion module includes:
[0258] A traversal submodule, used to traverse the directory to be deleted indicated by the deletion task, and determine the data corresponding to the directory to be deleted indicated by the deletion task;
[0259] A quantity acquisition submodule is used to acquire the number of files deleted by the client within a preset deletion threshold time period;
[0260] A quantity comparison submodule, used to compare the number of files deleted by the preset client within a preset deletion threshold time period with a preset deletion file quantity threshold;
[0261] A deletion submodule, configured to delete the data corresponding to the directory to be deleted indicated by the deletion task if the number of files deleted by the preset client within the preset deletion threshold time period is less than the deletion file number threshold;
[0262] The stop submodule is used to stop traversing the to-be-deleted directory indicated by the deletion task if the number of files deleted by the preset client within the preset deletion threshold time period is greater than the deletion file number threshold.
[0263] In the above embodiment, by scanning the target data directory corresponding to the client in the recycle bin data directory of the server according to the scanning task, determining the data to be deleted in the target data directory can more accurately identify the data to be deleted. By sending the directory of the data to be deleted instead of the data to the server, the pressure of data transmission is reduced and the utilization of resources is optimized.
[0264] As for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0265] like Figure 8 , showing a structural block diagram of an electronic device 50 provided in an embodiment of the present invention, including:
[0266] A processor 501, a memory 502, and a computer program 5021 stored in the memory 502 and capable of running on the processor 501. When the computer program 5021 is executed by the processor 501, each process of the above-mentioned distributed file system recycle bin cleaning method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.
[0267] like Fig. 9 , shows a structural block diagram of a computer-readable storage medium 60 provided in an embodiment of the present invention. A computer program 601 is stored on the computer-readable storage medium 60. When the computer program 601 is executed by the processor, each process of the above-mentioned distributed file system recycle bin cleaning method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.
[0268] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.
[0269] It will be appreciated by those skilled in the art that the embodiments of the present invention may be provided as methods, devices, or computer program products. Therefore, the embodiments of the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the embodiments of the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.
[0270] The embodiments of the present invention are described with reference to the flowcharts and / or block diagrams of the methods, terminal devices (systems), and computer program products according to the embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of the processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing terminal device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing terminal device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0271] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing terminal device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce a manufactured product including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0272] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal device so that a series of operating steps are executed on the computer or other programmable terminal device to produce a computer-implemented process, thereby providing instructions for executing on the computer or other programmable terminal device to implement the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0273] Although the preferred embodiments of the present invention have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the embodiments of the present invention.
[0274] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or terminal device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or terminal device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or terminal device including the elements.
[0275] The above describes in detail a method for cleaning a recycle bin of a distributed file system, a device for cleaning a recycle bin of a distributed file system, an electronic device, and a computer-readable storage medium provided by the present invention. Specific examples are used herein to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea. At the same time, for those skilled in the art, according to the idea of the present invention, there may be changes in the specific implementation methods and application scopes. In summary, the content of this specification should not be understood as limiting the present invention.
Claims
1. A method for cleaning a recycle bin of a distributed file system, characterized in that: The distributed file system includes a server and at least one client, and the method includes: The server sends a scanning task to the client; the scanning task is used to instruct the client to scan the corresponding target data directory in the recycle bin data directory of the server to determine the data to be deleted in the target data directory; Receiving the directory of the data to be deleted sent by the client, and putting the directory of the data to be deleted into a queue of data to be deleted; A deletion task is generated according to the queue of data to be deleted, and the deletion task is sent to the client; the deletion task is used to instruct the client to delete data corresponding to a directory of the specified data to be deleted.
2. The method according to claim 1, characterized in that The server sends a scanning task to the client, including: Obtain the recycle bin data directory; Determine the target data directory corresponding to the client from the recycle bin data directory; Acquire historical information of the client being called to execute the scanning task; According to the historical information that the client is called to execute the scanning task, the scanning task for the target data directory is sent to the client.
3. The method according to claim 2, characterized in that The obtaining of historical information of the client being called to execute the scanning task includes: Creating a first counter for the client; The first counter is used to record the number of times the client is called to perform the scanning task within a first preset time period; the first preset time period is used to indicate the existence time of the first counter; The sending the scanning task for the target data directory to the client according to the historical information that the client is called to execute the scanning task includes: Determine a first candidate client whose number of times of being called to perform the scanning task within a preset time period is less than a first threshold; the first threshold is used to indicate an upper limit number of times the client performs the scanning task within the first preset time period; Determining a first target client from the first candidate clients according to the number of times the first candidate clients are called to perform the scanning task within a preset time period; The scanning task is sent to the first target client.
4. The method according to claim 1, characterized in that: The step of placing the directory of the data to be deleted into a queue of data to be deleted comprises: Obtaining the expiration time of the directory of the data to be deleted; According to the expiration time of the directory of the data to be deleted, the directory of the data to be deleted is sorted in descending order; The sorted directory of the data to be deleted is put into the queue of data to be deleted.
5. The method according to claim 1, characterized in that The sending the deletion task to the client includes: Obtaining historical information of the client being called to execute the deletion task; The deletion task is sent to the client according to historical information that the client is called to execute the deletion task.
6. The method according to claim 5, characterized in that The obtaining of historical information of the client being called to execute the deletion task includes: Creating a second counter for the client; The second counter is used to record the number of times the client is called to execute the deletion task within a second preset time period; the second preset time period is used to indicate the existence time of the second counter; The sending the deletion task to the client according to the historical information that the client is called to execute the deletion task includes: Determine a second candidate client whose number of times of being called to execute the deletion task within the second preset time period is less than a second threshold; the second threshold is used to indicate an upper limit of the number of times the client executes the deletion task within the second preset time period; Determine a second target client from the second candidate clients according to the number of times the second candidate clients are called to perform the deletion task within a second preset time period; The deletion task is sent to the second target client.
7. A method for cleaning a recycle bin of a distributed file system, characterized in that: The distributed file system includes a server and at least one client, and the method includes: The client receives the scanning task sent by the server; According to the scanning task, scanning the target data directory corresponding to the client in the recycle bin data directory of the server, and determining the data to be deleted in the target data directory; Determine the directory of the data to be deleted, and send the directory of the data to be deleted to the server; receiving a deletion task sent by the server; the deletion task is generated by the server according to the directory of the data to be deleted; According to the deletion task, the data corresponding to the directory of the specified data to be deleted is deleted.
8. The method according to claim 7, characterized in that The determining the data to be deleted in the target data directory includes: Obtaining the timestamp of the data in the target data directory; Determine whether the data in the target data directory is expired according to the timestamp of the data in the target data directory; The expired data in the target data directory is determined as data to be deleted.
9. The method according to claim 7, characterized in that: According to the deletion task, Delete the data corresponding to the directory of the specified data to be deleted, including: Traversing the to-be-deleted directory indicated by the deletion task, and determining the data corresponding to the to-be-deleted directory indicated by the deletion task; Obtaining the number of files deleted by the client within a preset deletion threshold time period; Compare the number of files deleted by the preset client within a preset deletion threshold time period with a preset deletion file number threshold; If the number of files deleted by the preset client within the preset deletion threshold time period is less than the deletion file number threshold, deleting the data corresponding to the to-be-deleted directory indicated by the deletion task; If the number of files deleted by the preset client within the preset deletion threshold time period is greater than the deletion file number threshold, then traversing the to-be-deleted directory indicated by the deletion task is stopped.
10. A recycle bin cleaning device for a distributed file system, characterized in that: The distributed file system includes a server and at least one client, the device is applied to the server, and the device includes: A scanning task sending module, used to send a scanning task to the client; the scanning task is used to instruct the client to scan the corresponding target data directory in the recycle bin data directory of the server to determine the data to be deleted in the target data directory; A queue processing module, used for receiving the directory of the data to be deleted sent by the client, and putting the directory of the data to be deleted into a queue of data to be deleted; The deletion task sending module is used to generate a deletion task according to the to-be-deleted data queue and send the deletion task to the client; the deletion task is used to instruct the client to delete the data corresponding to the directory of the specified to-be-deleted data.
11. A recycle bin cleaning device for a distributed file system, characterized in that: The distributed file system includes a server and at least one client, the device is applied to the client, and the device includes: A scanning task receiving module, used for receiving the scanning task sent by the server; A to-be-deleted data determination module, configured to scan a target data directory corresponding to the client in the recycle bin data directory of the server according to the scanning task, and determine the to-be-deleted data in the target data directory; A directory sending module, used for determining the directory of the data to be deleted and sending the directory of the data to be deleted to the server; A deletion task receiving module, used for receiving a deletion task sent by the server; the deletion task is generated by the server according to the directory of the data to be deleted; The data deletion module is used to delete the data corresponding to the directory of the specified data to be deleted according to the deletion task.
12. An electronic device, characterized in that: include: A processor, a memory, and a computer program stored in the memory and capable of running on the processor, wherein when the computer program is executed by the processor, the steps of the recycle bin cleaning method of the distributed file system as described in any one of claims 1-6 or 7-9 are implemented.
13. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by the processor, the steps of the recycle bin cleaning method of the distributed file system as described in any one of claims 1-6 or 7-9 are implemented.
