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

Weiwei Yang commented on HDFS-11680:
------------------------------------

Hi [~yuanbo]

Thanks for the updates. But is there anything missing? When I test this patch, 
I could not get it work, please take a look,

Create a container,

{noformat}
[wwei@ozone1 hadoop-3.0.0-alpha3-SNAPSHOT]$ ./bin/hdfs scm -container -create 
-c 20170509c1
Creating container : 20170509c1.
Container created.
{noformat}

Create this container again failed with key already existed, that means the 
container did exist now

{noformat}
[wwei@ozone1 hadoop-3.0.0-alpha3-SNAPSHOT]$ ./bin/hdfs scm -container -create 
-c 20170509c1
Creating container : 20170509c1.
Error executing 
command:org.apache.hadoop.ipc.RemoteException(java.io.IOException): Specified 
container already exists. key : 20170509c1
{noformat}

Info the container,

{noformat}
[wwei@ozone1 hadoop-3.0.0-alpha3-SNAPSHOT]$ ./bin/hdfs scm -container -info 
20170509c1
Error executing 
command:org.apache.hadoop.scm.container.common.helpers.StorageContainerException:
 Unable to find the container. Name: b8016bcc-50ab-4e77-8e56-8c79fdd11600
{noformat}

Looks like the {{containerName}} passed to 
{{ContainerManagerImpl#readContainer}} was not correct. Can you fix this?

Some more nits,

# Better to put {{String traceID}} argument at the end of the 
{{ContainerProtocolCalls#readContainer}} argument list,  like rest of methods.
# Change {{MockStorageClient#readContainer}} to
{code}
 return ContainerData.newBuilder()
        .setName(pipeline.getContainerName())
        .build();
{code}
# Do not change the java doc for {{ScmClient#deleteContainer}}, "Deletes an 
existing container." was correct like everyone else. Please change the doc for 
{{readContainer}} to "Reads metadata from an existing container."

Thank you.

> Ozone: SCM CLI: Implement info container command
> ------------------------------------------------
>
>                 Key: HDFS-11680
>                 URL: https://issues.apache.org/jira/browse/HDFS-11680
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>          Components: ozone
>            Reporter: Weiwei Yang
>            Assignee: Yuanbo Liu
>              Labels: command-line
>         Attachments: HDFS-11680-HDFS-7240.001.patch, 
> HDFS-11680-HDFS-7240.002.patch, HDFS-11680-HDFS-7240.003.patch, 
> HDFS-11680-HDFS-7240.004.patch, HDFS-11680-HDFS-7240.005.patch, 
> output.003.txt, output.txt
>
>
> Implement info container
> {code}
> hdfs scm -container info <container name>
> {code}
> Returns information about a specific container.



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