diff --git a/clients/cli/src/main/java/org/apache/gravitino/cli/commands/AllMetalakeDetails.java b/clients/cli/src/main/java/org/apache/gravitino/cli/commands/AllMetalakeDetails.java index 07d61dcaa7c..b76138cb5c9 100644 --- a/clients/cli/src/main/java/org/apache/gravitino/cli/commands/AllMetalakeDetails.java +++ b/clients/cli/src/main/java/org/apache/gravitino/cli/commands/AllMetalakeDetails.java @@ -55,6 +55,6 @@ public void handle() { String all = Joiner.on(System.lineSeparator()).join(metalakeDetails); - System.out.print(all.toString()); + System.out.print(all); } } diff --git a/clients/cli/src/main/java/org/apache/gravitino/cli/commands/GroupDetails.java b/clients/cli/src/main/java/org/apache/gravitino/cli/commands/GroupDetails.java index 7217d5ad3bd..58188c38a3f 100644 --- a/clients/cli/src/main/java/org/apache/gravitino/cli/commands/GroupDetails.java +++ b/clients/cli/src/main/java/org/apache/gravitino/cli/commands/GroupDetails.java @@ -62,6 +62,6 @@ public void handle() { String all = roles.isEmpty() ? "The group has no roles." : String.join(",", roles); - System.out.println(all.toString()); + System.out.println(all); } } diff --git a/clients/cli/src/main/java/org/apache/gravitino/cli/commands/ListAllTags.java b/clients/cli/src/main/java/org/apache/gravitino/cli/commands/ListAllTags.java index cded12808d9..e3bd42ae04c 100644 --- a/clients/cli/src/main/java/org/apache/gravitino/cli/commands/ListAllTags.java +++ b/clients/cli/src/main/java/org/apache/gravitino/cli/commands/ListAllTags.java @@ -55,6 +55,6 @@ public void handle() { String all = tags.length == 0 ? "No tags exist." : String.join(",", tags); - System.out.println(all.toString()); + System.out.println(all); } } diff --git a/clients/cli/src/main/java/org/apache/gravitino/cli/commands/ListColumns.java b/clients/cli/src/main/java/org/apache/gravitino/cli/commands/ListColumns.java index f3e8e0125cf..e1d8eac2086 100644 --- a/clients/cli/src/main/java/org/apache/gravitino/cli/commands/ListColumns.java +++ b/clients/cli/src/main/java/org/apache/gravitino/cli/commands/ListColumns.java @@ -94,6 +94,6 @@ public void handle() { + System.lineSeparator()); } - System.out.print(all.toString()); + System.out.print(all); } } diff --git a/clients/cli/src/main/java/org/apache/gravitino/cli/commands/ListEntityTags.java b/clients/cli/src/main/java/org/apache/gravitino/cli/commands/ListEntityTags.java index a1c316fbdf2..c0dc501732e 100644 --- a/clients/cli/src/main/java/org/apache/gravitino/cli/commands/ListEntityTags.java +++ b/clients/cli/src/main/java/org/apache/gravitino/cli/commands/ListEntityTags.java @@ -93,6 +93,6 @@ public void handle() { String all = String.join(",", tags); - System.out.println(all.toString()); + System.out.println(all); } } diff --git a/clients/cli/src/main/java/org/apache/gravitino/cli/commands/ListFilesets.java b/clients/cli/src/main/java/org/apache/gravitino/cli/commands/ListFilesets.java index d00ba3e6ba5..cb46b7953c3 100644 --- a/clients/cli/src/main/java/org/apache/gravitino/cli/commands/ListFilesets.java +++ b/clients/cli/src/main/java/org/apache/gravitino/cli/commands/ListFilesets.java @@ -73,6 +73,6 @@ public void handle() { String all = filesets.length == 0 ? "No filesets exist." : Joiner.on(",").join(filesets); - System.out.println(all.toString()); + System.out.println(all); } } diff --git a/clients/cli/src/main/java/org/apache/gravitino/cli/commands/ListGroups.java b/clients/cli/src/main/java/org/apache/gravitino/cli/commands/ListGroups.java index a517b4daed8..844b8e21d09 100644 --- a/clients/cli/src/main/java/org/apache/gravitino/cli/commands/ListGroups.java +++ b/clients/cli/src/main/java/org/apache/gravitino/cli/commands/ListGroups.java @@ -55,6 +55,6 @@ public void handle() { String all = groups.length == 0 ? "No groups exist." : String.join(",", groups); - System.out.println(all.toString()); + System.out.println(all); } } diff --git a/clients/cli/src/main/java/org/apache/gravitino/cli/commands/ListProperties.java b/clients/cli/src/main/java/org/apache/gravitino/cli/commands/ListProperties.java index 56c8fb8ba78..a7d08ba36e2 100644 --- a/clients/cli/src/main/java/org/apache/gravitino/cli/commands/ListProperties.java +++ b/clients/cli/src/main/java/org/apache/gravitino/cli/commands/ListProperties.java @@ -51,6 +51,6 @@ public void printProperties(Map properties) { all.append(property.getKey() + "," + property.getValue() + System.lineSeparator()); } - System.out.print(all.toString()); + System.out.print(all); } } diff --git a/clients/cli/src/main/java/org/apache/gravitino/cli/commands/ListRoles.java b/clients/cli/src/main/java/org/apache/gravitino/cli/commands/ListRoles.java index 2ecb35bd093..760fe21e3bc 100644 --- a/clients/cli/src/main/java/org/apache/gravitino/cli/commands/ListRoles.java +++ b/clients/cli/src/main/java/org/apache/gravitino/cli/commands/ListRoles.java @@ -55,6 +55,6 @@ public void handle() { String all = roles.length == 0 ? "No roles exist." : String.join(",", roles); - System.out.println(all.toString()); + System.out.println(all); } } diff --git a/clients/cli/src/main/java/org/apache/gravitino/cli/commands/ListSchema.java b/clients/cli/src/main/java/org/apache/gravitino/cli/commands/ListSchema.java index 110a6477a62..695f44d42d7 100644 --- a/clients/cli/src/main/java/org/apache/gravitino/cli/commands/ListSchema.java +++ b/clients/cli/src/main/java/org/apache/gravitino/cli/commands/ListSchema.java @@ -62,6 +62,6 @@ public void handle() { String all = schemas.length == 0 ? "No schemas exist." : Joiner.on(",").join(schemas); - System.out.println(all.toString()); + System.out.println(all); } } diff --git a/clients/cli/src/main/java/org/apache/gravitino/cli/commands/ListTables.java b/clients/cli/src/main/java/org/apache/gravitino/cli/commands/ListTables.java index 41a71e87c00..515fb28678c 100644 --- a/clients/cli/src/main/java/org/apache/gravitino/cli/commands/ListTables.java +++ b/clients/cli/src/main/java/org/apache/gravitino/cli/commands/ListTables.java @@ -66,6 +66,6 @@ public void handle() { ? "No tables exist." : Joiner.on(System.lineSeparator()).join(tableNames); - System.out.println(all.toString()); + System.out.println(all); } } diff --git a/clients/cli/src/main/java/org/apache/gravitino/cli/commands/ListUsers.java b/clients/cli/src/main/java/org/apache/gravitino/cli/commands/ListUsers.java index a70176dcfcb..a61dc3d60fd 100644 --- a/clients/cli/src/main/java/org/apache/gravitino/cli/commands/ListUsers.java +++ b/clients/cli/src/main/java/org/apache/gravitino/cli/commands/ListUsers.java @@ -53,8 +53,7 @@ public void handle() { exitWithError(exp.getMessage()); } - String all = String.join(",", users); - - System.out.println(all.toString()); + String all = user.length==0 ? "No User exist.": String.join(",",users); + System.out.println(all); } } diff --git a/clients/cli/src/main/java/org/apache/gravitino/cli/commands/UntagEntity.java b/clients/cli/src/main/java/org/apache/gravitino/cli/commands/UntagEntity.java index 3503d5eb7bf..553f9b196d7 100644 --- a/clients/cli/src/main/java/org/apache/gravitino/cli/commands/UntagEntity.java +++ b/clients/cli/src/main/java/org/apache/gravitino/cli/commands/UntagEntity.java @@ -19,7 +19,7 @@ package org.apache.gravitino.cli.commands; -import com.google.common.base.Joiner; + import org.apache.gravitino.Catalog; import org.apache.gravitino.NameIdentifier; import org.apache.gravitino.Schema; @@ -33,7 +33,7 @@ import org.apache.gravitino.rel.Table; public class UntagEntity extends Command { - public static final Joiner COMMA_JOINER = Joiner.on(", ").skipNulls(); + protected final String metalake; protected final FullName name; protected final String[] tags; diff --git a/clients/cli/src/main/java/org/apache/gravitino/cli/commands/UserDetails.java b/clients/cli/src/main/java/org/apache/gravitino/cli/commands/UserDetails.java index e37f8e6f139..d89597d1698 100644 --- a/clients/cli/src/main/java/org/apache/gravitino/cli/commands/UserDetails.java +++ b/clients/cli/src/main/java/org/apache/gravitino/cli/commands/UserDetails.java @@ -62,6 +62,6 @@ public void handle() { String all = roles.isEmpty() ? "The user has no roles." : String.join(",", roles); - System.out.println(all.toString()); + System.out.println(all); } }