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

Nandakumar commented on HDFS-11779:
-----------------------------------

Thanks [~cheersyang] for working on this. Please find my comments below.

1. With current logic listBuckets will return empty list even if the Volume is 
not present, I think we should throw {{KSMException#FAILED_VOLUME_NOT_FOUND}}. 
If we return an empty list the user might think that there is a volume with no 
buckets.

2. In {{MetadataManagerImpl#listBuckets}} volumeNameFilter actually checks for 
bucketPrefix, we can rename it to bucketPrefixFilter; similarly prevKeyFilter 
checks for volumeName, this can be renamed to volumeNameFilter

3. {{LevelDBStore#getRangeKVs}} doesn't have endKey, so it will iterate till 
the end. When the database is huge and we are querying for a volume which is 
present on top, even though the result is restricted using filters, we will 
unnecessary be iterating over the whole database.


> Ozone: KSM: add listBuckets
> ---------------------------
>
>                 Key: HDFS-11779
>                 URL: https://issues.apache.org/jira/browse/HDFS-11779
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>          Components: ozone
>    Affects Versions: HDFS-7240
>            Reporter: Anu Engineer
>            Assignee: Weiwei Yang
>         Attachments: HDFS-11779-HDFS-7240.001.patch
>
>
> Lists buckets of a given volume. Similar to listVolumes, paging supported via 
> prevKey, prefix and maxKeys.



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

---------------------------------------------------------------------
To unsubscribe, e-mail: hdfs-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org

Reply via email to