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

Weiwei Yang commented on HDFS-11679:
------------------------------------

Hi [~yuanbo]

Thanks for the updates. After tested your patch, please see my comments below

1. Like [~vagarychen] commented, I think we can enforce the -count argument. 
That says if -count is not specified in CLI, the command should fail with 
missing argument message. So recap the usage, {{-count}} should be required, 
both {{-start}} and {{-prefix}} are optional. And even more, we should let the 
value of count be in (0,1024] range, it doesn't make sense to list more than 
1024 entries from command line, impossible for human to read.

2. I tested most command use with {{./bin/hdfs scm -container -list -count 
10}}, and I get following output

{noformat}
Container Name: 20170523c0
LeaderID: oz3.fyre.ibm.com
Datanodes: [oz3.fyre.ibm.com]
Container Name: 20170523c1
LeaderID: oz3.fyre.ibm.com
Datanodes: [oz3.fyre.ibm.com]
Container Name: 20170523c2
LeaderID: oz1.fyre.ibm.com
Datanodes: [oz1.fyre.ibm.com]
Container Name: 20170523c3
LeaderID: oz1.fyre.ibm.com
Datanodes: [oz1.fyre.ibm.com]
{noformat}

I think I have commented before, this is not user friendly output, can we 
revise this to something like

{noformat}
1. container1: [dn1, dn2, dn3]
2. container2: [dn1, dn2, dn3]
...
{noformat}

or some better format if you can suggest.

3. Looks like {{-start}} and {{-prefix}} somehow doesn't work on my cluster

{noformat}
./bin/hdfs scm -container -list -start 20170523c1
./bin/hdfs scm -container -list -prefix 2017

.. they both return nothing..
{noformat}

not sure why yet, can you please double check this in an end-to-end test?

Thank you.


> 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: hdfs-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org

Reply via email to