adoroszlai commented on code in PR #8409:
URL: https://github.com/apache/ozone/pull/8409#discussion_r2078913578


##########
hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/debug/logs/container/ListContainers.java:
##########
@@ -57,7 +65,11 @@ public Void call() throws Exception {
 
     ContainerDatanodeDatabase cdd = new 
ContainerDatanodeDatabase(dbPath.toString());
 
-    cdd.listContainersByState(state.name(), listOptions.getLimit());
+    if (exclusiveOptions.duplicateOpen) {
+      cdd.findDuplicateOpenContainer();
+    } else if (exclusiveOptions.state != null) {
+      cdd.listContainersByState(exclusiveOptions.state.name(), 
listOptions.getLimit());
+    }

Review Comment:
   `ExclusiveOptions` only forces choice between `--state` and 
`--duplicate-open`.  But neither is `--limit` applicable to 
`findDuplicateOpenContainer()`.  I think this should be a separate subcommand.  
Please leave `ListContainers` unchanged.



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

To unsubscribe, e-mail: issues-unsubscr...@ozone.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@ozone.apache.org
For additional commands, e-mail: issues-h...@ozone.apache.org

Reply via email to