nandakumar131 commented on a change in pull request #776: HDDS-3348. scmcli 
container info command shows the wrong container state.
URL: https://github.com/apache/hadoop-ozone/pull/776#discussion_r404748859
 
 

 ##########
 File path: 
hadoop-hdds/tools/src/main/java/org/apache/hadoop/hdds/scm/cli/container/InfoSubcommand.java
 ##########
 @@ -57,26 +55,13 @@
   @Override
   public Void call() throws Exception {
     try (ScmClient scmClient = parent.getParent().createScmClient()) {
-      ContainerWithPipeline container = scmClient.
+      final ContainerWithPipeline container = scmClient.
           getContainerWithPipeline(containerID);
       Preconditions.checkNotNull(container, "Container cannot be null");
 
-      ContainerDataProto containerData = scmClient.readContainer(container
-          .getContainerInfo().getContainerID(), container.getPipeline());
-
       // Print container report info.
       LOG.info("Container id: {}", containerID);
-      String openStatus =
-          containerData.getState() == ContainerDataProto.State.OPEN ? "OPEN" :
-              "CLOSED";
-      LOG.info("Container State: {}", openStatus);
-      LOG.info("Container Path: {}", containerData.getContainerPath());
-
-      // Output meta data.
 
 Review comment:
   We were printing the container path from one of the datanode, this could be 
misleading if datanodes are configured with a different path for the data 
directory. It's better to not print the container path in this context.
   
   Printing Datanodes are not removed, it's still printed.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to