[ 
https://issues.apache.org/jira/browse/HDFS-12742?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16303678#comment-16303678
 ] 

Mukul Kumar Singh commented on HDFS-12742:
------------------------------------------

[~cheersyang], I feel that the solution which [~shashikant] is proposing will 
be better for deleting multiple keys from a container.

Lets take an example, suppose a ozone cluster had million keys.
With the new idea, The KSM will iterate over all the keys and build a list of 
all the containers which needs to be deleted. Please note that here we will 
delete the entire container by sending the {{DeleteContainer}} request to the 
datanodes with the force option. Once the container is deleted from the 
datanodes, the container will be deleted from SCM as well. This will be faster 
that deleting these keys one by one through key deleting service in KSM. 

I completely agree with you that we will have to iterate through all the keys 
in the KSM anyways. However, the delete operation will be fast because now the 
entire container can be deleted rather than iterating chunks of the container, 
this method will also be helpful in reducing the number of RPC requests sent to 
datanodes as well.

> Add support for KSM --expunge command
> -------------------------------------
>
>                 Key: HDFS-12742
>                 URL: https://issues.apache.org/jira/browse/HDFS-12742
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>    Affects Versions: HDFS-7240
>            Reporter: Shashikant Banerjee
>            Assignee: Shashikant Banerjee
>             Fix For: HDFS-7240
>
>         Attachments: HDFS-12742-HDFS-7240.001.patch, 
> HDFS-12742-HDFS-7240.002.patch
>
>
> KSM --expunge will delete all the data from the data nodes for all the keys 
> in the KSM db. 
> User will have no control over the deletion.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to