justinmclean commented on code in PR #6091:
URL: https://github.com/apache/gravitino/pull/6091#discussion_r1902416081
##########
clients/cli/src/main/java/org/apache/gravitino/cli/GravitinoCommandLine.java:
##########
@@ -221,21 +218,28 @@ private void handleMetalakeCommand() {
}
if (line.hasOption(GravitinoOptions.ENABLE)) {
boolean enableAllCatalogs = line.hasOption(GravitinoOptions.ALL);
- newMetalakeEnable(url, ignore, metalake, enableAllCatalogs).handle();
+ newMetalakeEnable(url, ignore, metalake,
enableAllCatalogs).validate().handle();
+ break;
}
if (line.hasOption(GravitinoOptions.DISABLE)) {
- newMetalakeDisable(url, ignore, metalake).handle();
+ newMetalakeDisable(url, ignore, metalake).validate().handle();
+ break;
}
if (line.hasOption(GravitinoOptions.COMMENT)) {
comment = line.getOptionValue(GravitinoOptions.COMMENT);
- newUpdateMetalakeComment(url, ignore, metalake, comment).handle();
+ newUpdateMetalakeComment(url, ignore, metalake,
comment).validate().handle();
+ break;
}
if (line.hasOption(GravitinoOptions.RENAME)) {
String newName = line.getOptionValue(GravitinoOptions.RENAME);
force = line.hasOption(GravitinoOptions.FORCE);
- newUpdateMetalakeName(url, ignore, force, metalake,
newName).handle();
+ newUpdateMetalakeName(url, ignore, force, metalake,
newName).validate().handle();
+ break;
}
+
+ System.err.println("The command does nothing.");
+ Main.exit(-1);
Review Comment:
I'm not sure we should add this, while it could be a mistake, it could also
be intentional if scripted. I'm leaning towards not having these two lines.
--
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]