rich7420 commented on code in PR #10755:
URL: https://github.com/apache/ozone/pull/10755#discussion_r3584740110


##########
hadoop-ozone/cli-admin/src/main/java/org/apache/hadoop/hdds/scm/cli/datanode/DatanodeParameters.java:
##########
@@ -43,10 +43,11 @@ public class DatanodeParameters extends ItemsFromStdin {
           "  # From file having list of dns to balance",
           "  ozone admin datanode diskbalancer report - < datanode-lists.txt",
           "Port is optional and defaults to 19864 (CLIENT_RPC port).",
-          "Address examples: 'DN-1', 'DN-1:19864', '192.168.1.10'."
+          "Address examples: 'DN-1', 'DN-1:19864', '192.168.1.10',",
+          "  'a3b63511-bdf8-4fa1-8ab6-d19c0e806f84' (datanode UUID)."
       },
       arity = "0..*",
-      paramLabel = "<datanode address>")
+      paramLabel = "<datanode address or id>")

Review Comment:
   Nice usability win 👍 One thing I keep going back and forth on: `ozone admin 
datanode list` looks up by UUID via an explicit `-id` flag, but here we 
auto-detect it from the argument shape. The auto-detect is definitely handier — 
I'm just wondering if it's worth keeping the two commands consistent, or if the 
positional behaviour is intentional here? Not a blocker at all, just feels 
easier to settle now than later.



##########
hadoop-ozone/cli-admin/src/main/java/org/apache/hadoop/hdds/scm/cli/datanode/DiskBalancerSubCommandUtil.java:
##########
@@ -133,9 +199,33 @@ public static String 
getDatanodeHostAndIp(HddsProtos.DatanodeDetailsProto nodePr
 
     // Format the output string
     String addressPort = ipAddress + ":" + port;
+    String addressWithUuid = appendDatanodeUuid(addressPort, nodeProto);

Review Comment:
   Just noticing this also tweaks the status/report output for the existing 
cases, not only UUID input — the current `hostname (ip:port)` becomes `hostname 
(ip:port / <uuid>)`. Personally I like seeing the UUID, but it could catch out 
anyone parsing the old format, so might be worth a quick line in the PR 
description to make it a deliberate change.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


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

Reply via email to