Asynchronously Deleting HDFS Data
Scenario
When it comes to deleting large directories, the HDFS asynchronous deletion feature can be used to delete blocks asynchronously with traffic control. This can effectively shorten the lock holding time.
Notes and Constraints
This function is available in MRS 3.5.0 or later only.
Procedure
- Log in to FusionInsight Manager.
For details about how to log in to FusionInsight Manager, see Accessing MRS FusionInsight Manager.
- Choose Cluster > Services > HDFS > Configurations > All Configurations.
- Enter the parameter name in the search box and modify the HDFS service-level parameter as you need.
Table 1 Parameters for configuring HDFS asynchronous deletion Parameter
Description
Example Value
dfs.namenode.block.deletion.async
Whether to enable the asynchronous block deletion feature.
- true: The function is enabled. Then, the block deletion is executed asynchronously.
- false: The function is disabled. Then the deletion operation is performed synchronously, which may cause a delay.
true
dfs.namenode.block.deletion.lock.threshold.ms
Maximum duration for continuously lock a directory or file. After asynchronous block deletion is enabled, the specified maximum value is applied. Unit: millisecond
You can adjust the threshold based on the actual lock blocking status. For example, if the lock blocking time often exceeds the default value, you can increase the threshold to reduce unnecessary log records.
50
dfs.namenode.block.deletion.unlock.interval.ms
Temporary unlock duration when the lock duration exceeds the maximum. Unit: millisecond
10
- Save the configuration.
- Click the Instances tab, select all instances whose configurations have expired, choose More > Restart Instance, and restart the instances as prompted.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot