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

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

Thanks for the review [~xyao], Please find my replies as following.

1. MetadataManager#getIterator()/getVolumeRootKey()
I would suggest we add Metadata#isVolumeEmpty() instead of raw DB interator for 
the MetadataManager interface. The DB implementation details can be abstracted 
from the interface by moving some of the implementation details using 
DBInterator from VolumeManagerImpl#deleteVolume (Line 296-301) into 
MetadataManagerImpl#isVolumeEmpty().
.bq done, added a new function in MetadataManagerImpl.

2. ACL/permission check for volume deletion.
We should check the owner and ACLs before allowing deleting volumes. I'm OK 
with just check the owner here or wait for the other ticket on 
checkVolumeAccess to fix this.
.bq As you suggested, I would like to address this as part of check volume 
access.

> Ozone:KSM : add deleteVolume
> ----------------------------
>
>                 Key: HDFS-11774
>                 URL: https://issues.apache.org/jira/browse/HDFS-11774
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>          Components: ozone
>    Affects Versions: HDFS-7240
>            Reporter: Anu Engineer
>            Assignee: Mukul Kumar Singh
>         Attachments: HDFS-11774-HDFS-7240.001.patch, 
> HDFS-11774-HDFS-7240.002.patch
>
>
> Delete a volume if there are no buckets present inside the volume. 



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

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

Reply via email to