justinmclean commented on code in PR #6573:
URL: https://github.com/apache/gravitino/pull/6573#discussion_r1976528041
##########
clients/cli/src/main/java/org/apache/gravitino/cli/commands/ListMetalakeProperties.java:
##########
@@ -45,18 +45,20 @@ public ListMetalakeProperties(CommandContext context,
String metalake) {
/** List the properties of a metalake. */
@Override
public void handle() {
- Metalake gMetalake = null;
- try {
- GravitinoAdminClient client = buildAdminClient();
- gMetalake = client.loadMetalake(metalake);
+ try (GravitinoAdminClient client = buildAdminClient()) { // Ensure
resource cleanup
+ Metalake gMetalake = client.loadMetalake(metalake);
+
+ if (gMetalake == null) {
+ exitWithError("Metalake not found: " + metalake);
+ return;
+ }
+
+ Map<String, String> properties = gMetalake.properties();
+ printProperties(properties);
Review Comment:
Please leave these lines where they were
--
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]