justinmclean commented on code in PR #5793:
URL: https://github.com/apache/gravitino/pull/5793#discussion_r1875322234
##########
clients/cli/src/main/java/org/apache/gravitino/cli/GravitinoCommandLine.java:
##########
@@ -652,21 +799,29 @@ private void handleOwnerCommand() {
Command.setAuthenticationMode(auth, userName);
- if (CommandActions.DETAILS.equals(command)) {
- newOwnerDetails(url, ignore, metalake, entityName, entity).handle();
- } else if (CommandActions.SET.equals(command)) {
- String owner = line.getOptionValue(GravitinoOptions.USER);
- String group = line.getOptionValue(GravitinoOptions.GROUP);
-
- if (owner != null && group == null) {
- newSetOwner(url, ignore, metalake, entityName, entity, owner,
false).handle();
- } else if (owner == null && group != null) {
- newSetOwner(url, ignore, metalake, entityName, entity, group,
true).handle();
- } else {
- System.err.println(ErrorMessages.INVALID_SET_COMMAND);
- }
- } else {
- System.err.println(ErrorMessages.UNSUPPORTED_ACTION);
+ switch (command) {
+ case CommandActions.DETAILS:
+ newOwnerDetails(url, ignore, metalake, entityName, entity).handle();
+ break;
+
+ case CommandActions.SET:
+ {
+ String owner = line.getOptionValue(GravitinoOptions.USER);
+ String group = line.getOptionValue(GravitinoOptions.GROUP);
+
+ if (owner != null && group == null) {
+ newSetOwner(url, ignore, metalake, entityName, entity, owner,
false).handle();
+ } else if (owner == null && group != null) {
+ newSetOwner(url, ignore, metalake, entityName, entity, group,
true).handle();
+ } else {
+ System.err.println(ErrorMessages.INVALID_SET_COMMAND);
+ }
+ break;
+ }
Review Comment:
No they cannot - see above.
--
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]