shaofengshi commented on code in PR #5161:
URL: https://github.com/apache/gravitino/pull/5161#discussion_r1835836833
##########
clients/cli/src/main/java/org/apache/gravitino/cli/GravitinoCommandLine.java:
##########
@@ -367,6 +381,55 @@ protected void handleGroupCommand() {
}
}
+ /** Handles the command execution for Tags based on command type and the
command line options. */
+ protected void handleTagCommand() {
+ String url = getUrl();
+ FullName name = new FullName(line);
+ String metalake = name.getMetalakeName();
+ String tag = line.getOptionValue(GravitinoOptions.TAG);
+
+ if (CommandActions.DETAILS.equals(command)) {
+ new TagDetails(url, ignore, metalake, tag).handle();
+ } else if (CommandActions.LIST.equals(command)) {
+ if (!name.hasCatalogName()) {
+ new ListAllTags(url, ignore, metalake).handle();
+ } else {
+ new ListEntityTags(url, ignore, metalake, name).handle();
+ }
+ } else if (CommandActions.CREATE.equals(command)) {
+ String comment = line.getOptionValue(GravitinoOptions.COMMENT);
+ new CreateTag(url, ignore, metalake, tag, comment).handle();
+ } else if (CommandActions.DELETE.equals(command)) {
+ new DeleteTag(url, ignore, metalake, tag).handle();
+ } else if (CommandActions.SET.equals(command)) {
+ String property = line.getOptionValue(GravitinoOptions.PROPERTY);
+ String value = line.getOptionValue(GravitinoOptions.VALUE);
+ if (property != null && value != null) {
Review Comment:
I see it; adding the error message is good.
--
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]