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

Chen Liang commented on HDFS-11679:
-----------------------------------

Thanks [~yuanbo] for working on this, v003 patch looks pretty good to me. 

One minor thing, seems that if I do {{./bin/hdfs scm -container -list}} or 
{{./bin/hdfs scm -container -list -start XXX -prefix YYY}} (basically, without 
specifying -count), it will display nothing. My understanding is that this is 
because count is 0 by default, which is fine to me. But displaying nothing can 
be somewhat confusing, I'm thinking that, when the output is going to be empty, 
instead of showing nothing, we always display a message describing the possible 
reasons for empty output, such as "need to specify -count, or prefix not exist, 
or XYZ etc.". 

Also if we list on an empty db (i.e. list when no container exist at all), we 
get "Invalid start key, not found in current db." exception displayed. Maybe we 
want to catch this and display something more informative (e.g. no container 
exist).

> Ozone: SCM CLI: Implement list container command
> ------------------------------------------------
>
>                 Key: HDFS-11679
>                 URL: https://issues.apache.org/jira/browse/HDFS-11679
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>            Reporter: Weiwei Yang
>            Assignee: Yuanbo Liu
>              Labels: command-line
>         Attachments: HDFS-11679-HDFS-7240.001.patch, 
> HDFS-11679-HDFS-7240.002.patch, HDFS-11679-HDFS-7240.003.patch
>
>
> Implement the command to list containers
> {code}
> hdfs scm -container list -start <container name> [-count <100> | -end 
> <name>]{code}
> Lists all containers known to SCM. The option -start allows the listing to 
> start from a specified container and -count controls the number of entries 
> returned but it is mutually exclusive with the -end option which returns keys 
> from the -start to -end range.



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