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

Yuanbo Liu commented on HDFS-11779:
-----------------------------------

[~cheersyang] Just some minor comments:
1. MetadataManagerImpl.java
{quote}
    if (Strings.isNullOrEmpty(volumeName)) {
      return result;
    }
    byte[] volumeNameBytes = getVolumeKey(volumeName);
    if (store.get(volumeNameBytes) == null) {
      throw new KSMException("Volume " + volumeName + " not found.",
          ResultCodes.FAILED_VOLUME_NOT_FOUND);
    }
{quote}
When volumeName is null, it returns an empty bucket list, when volumeName 
cannot be found,
it throws an exception. I'm wondering whether it's better that these two cases 
have the same behavior, either returning empty
list or throwing exception.

2. re-base the patch please.
Others look good to me.

> 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, 
> HDFS-11779-HDFS-7240.002.patch, HDFS-11779-HDFS-7240.003.patch, 
> HDFS-11779-HDFS-7240.004.patch, HDFS-11779-HDFS-7240.005.patch, 
> HDFS-11779-HDFS-7240.006.patch, HDFS-11779-HDFS-7240.007.patch, 
> HDFS-11779-HDFS-7240.008.patch, HDFS-11779-HDFS-7240.009.patch, 
> HDFS-11779-HDFS-7240.010.patch, HDFS-11779-HDFS-7240.011.patch, 
> HDFS-11779-HDFS-7240.012.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