xunliu commented on code in PR #5606:
URL: https://github.com/apache/gravitino/pull/5606#discussion_r1847846692


##########
clients/cli/src/main/java/org/apache/gravitino/cli/commands/ListMetalakes.java:
##########
@@ -50,13 +51,12 @@ public void handle() {
       return;
     }
 
-    List<String> metalakeNames = new ArrayList<>();
+    List<String> headers = Arrays.asList("metalake");
+    List<List<String>> rows = new ArrayList<>();
     for (int i = 0; i < metalakes.length; i++) {
-      metalakeNames.add(metalakes[i].name());
+      rows.add(Arrays.asList(metalakes[i].name()));
     }
-
-    String all = Joiner.on(System.lineSeparator()).join(metalakeNames);
-
-    System.out.println(all.toString());
+    TablePrinter tablePrinter = new TablePrinter();
+    tablePrinter.print(headers, rows);

Review Comment:
   hi @justinmclean 
   I think we only need one format output, why do we needs kept two different 
output?
   Can you explain?



-- 
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: commits-unsubscr...@gravitino.apache.org

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

Reply via email to