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

Xiaoyu Yao commented on HDFS-11774:
-----------------------------------

Thanks [~msingh] for working on this. The patch looks good to me overall. Just 
two minor issues.

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().


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. 

> 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
>
>
> 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