World's most powerful open data catalog for building a high-performance, geo-distributed and federated metadata lake.
Java ai-catalogdata-catalogdatalakefederated-querylakehousemetadatametalakemodel-catalogopendatacatalogskycomputingstratosphere
[#8369] fix(cli): Reduce the javadoc warning log when building Gravitino (#8430)
Lord of Abyss1e9919f3b215
diff --git a/clients/cli/src/main/java/org/apache/gravitino/cli/AreYouSure.java b/clients/cli/src/main/java/org/apache/gravitino/cli/AreYouSure.javaindex a6d1450c1b..0a5088c5f3 100644--- a/clients/cli/src/main/java/org/apache/gravitino/cli/AreYouSure.java+++ b/clients/cli/src/main/java/org/apache/gravitino/cli/AreYouSure.java@@ -22,7 +22,7 @@ package org.apache.gravitino.cli;import java.nio.charset.StandardCharsets;import java.util.Scanner;-/* Ask are you sure you want to do this? */+/** Ask are you sure you want to do this? */public class AreYouSure {/**diff --git a/clients/cli/src/main/java/org/apache/gravitino/cli/CommandActions.java b/clients/cli/src/main/java/org/apache/gravitino/cli/CommandActions.javaindex ac2b46c794..5ad39db704 100644--- a/clients/cli/src/main/java/org/apache/gravitino/cli/CommandActions.java+++ b/clients/cli/src/main/java/org/apache/gravitino/cli/CommandActions.java@@ -26,16 +26,27 @@ import java.util.HashSet;* Gravitino CLI. It also can validate if a given command is a valid commands.*/public class CommandActions {+ /** Represents the help command. */public static final String HELP = "help";+ /** Represents the details command. */public static final String DETAILS = "details";+ /** Represents the list command. */public static final String LIST = "list";+ /** Represents the update command. */public static final String UPDATE = "update";+ /** Represents the create command. */public static final String CREATE = "create";+ /** Represents the delete command. */public static final String DELETE = "delete";+ /** Represents the set command. */public static final String SET = "set";+ /** Represents the remove command. */public static final String REMOVE = "remove";+ /** Represents the properties command. */public static final String PROPERTIES = "properties";+ /** Represents the revoke command. */public static final String REVOKE = "revoke";+ /** Represents the grant command. */public static final String GRANT = "grant";private static final HashSet<String> VALID_COMMANDS = new HashSet<>();diff --git a/clients/cli/src/main/java/org/apache/gravitino/cli/CommandContext.java b/clients/cli/src/main/java/org/apache/gravitino/cli/CommandContext.javaindex 1f92dd62c9..9e1d831f7d 100644--- a/clients/cli/src/main/java/org/apache/gravitino/cli/CommandContext.java+++ b/clients/cli/src/main/java/org/apache/gravitino/cli/CommandContext.java@@ -23,7 +23,7 @@ import com.google.common.base.Preconditions;import org.apache.commons.cli.CommandLine;import org.apache.gravitino.cli.commands.Command;-/* Context for a command */+/** Context for a command */public class CommandContext {private final boolean force;private final boolean ignoreVersions;diff --git a/clients/cli/src/main/java/org/apache/gravitino/cli/CommandEntities.java b/clients/cli/src/main/java/org/apache/gravitino/cli/CommandEntities.javaindex c6026c06e9..b7f1211eef 100644--- a/clients/cli/src/main/java/org/apache/gravitino/cli/CommandEntities.java+++ b/clients/cli/src/main/java/org/apache/gravitino/cli/CommandEntities.java@@ -26,17 +26,29 @@ import java.util.HashSet;* Gravitino CLI. It also can validate if a given entity is a valid entity.*/public class CommandEntities {+ /** Represents the Metalake entity. */public static final String METALAKE = "metalake";+ /** Represents the Catalog entity. */public static final String CATALOG = "catalog";+ /** Represents the Schema entity. */public static final String SCHEMA = "schema";+ /** Represents the Table entity. */public static final String TABLE = "table";+ /** Represents the Column entity. */public static final String COLUMN = "column";+ /** Represents the User entity. */public static final String USER = "user";+ /** Represents the Group entity. */public static final String GROUP = "group";+ /** Represents the Tag entity. */public static final String TAG = "tag";+ /** Represents the Topic entity. */public static final String TOPIC = "topic";+ /** Represents the Fileset entity. */public static final String FILESET = "fileset";+ /** Represents the Role entity. */public static final String ROLE = "role";+ /** Represents the Model entity. */public static final String MODEL = "model";private static final HashSet<String> VALID_ENTITIES = new HashSet<>();diff --git a/clients/cli/src/main/java/org/apache/gravitino/cli/CommandHandler.java b/clients/cli/src/main/java/org/apache/gravitino/cli/CommandHandler.javaindex 90f509bba5..733d0d71b5 100644--- a/clients/cli/src/main/java/org/apache/gravitino/cli/CommandHandler.java+++ b/clients/cli/src/main/java/org/apache/gravitino/cli/CommandHandler.java@@ -22,11 +22,20 @@ package org.apache.gravitino.cli;import com.google.common.base.Joiner;import java.util.List;+/** The base class for command handlers. */public abstract class CommandHandler {+ /** The joiner for comma-separated values. */public static final Joiner COMMA_JOINER = Joiner.on(", ").skipNulls();+ /** Handles the command. */protected abstract void handle();+ /**+ * Checks if the given list of entities is empty. If it is, prints an error message and exits the+ * program with status -1.+ *+ * @param entities the list of entities to check+ */protected void checkEntities(List<String> entities) {if (!entities.isEmpty()) {System.err.println(ErrorMessages.MISSING_ENTITIES + COMMA_JOINER.join(entities));diff --git a/clients/cli/src/main/java/org/apache/gravitino/cli/DefaultConverter.java b/clients/cli/src/main/java/org/apache/gravitino/cli/DefaultConverter.javaindex c13b77265a..651ead2d0f 100644--- a/clients/cli/src/main/java/org/apache/gravitino/cli/DefaultConverter.java+++ b/clients/cli/src/main/java/org/apache/gravitino/cli/DefaultConverter.java@@ -24,6 +24,10 @@ import org.apache.gravitino.rel.expressions.Expression;import org.apache.gravitino.rel.expressions.literals.Literals;import org.apache.gravitino.rel.types.Type;+/**+ * DefaultConverter is a utility class that converts a default value string to the appropriate+ * internal default value.+ */public class DefaultConverter {/**diff --git a/clients/cli/src/main/java/org/apache/gravitino/cli/ErrorMessages.java b/clients/cli/src/main/java/org/apache/gravitino/cli/ErrorMessages.javaindex 154f2560cc..385b25cca0 100644--- a/clients/cli/src/main/java/org/apache/gravitino/cli/ErrorMessages.java+++ b/clients/cli/src/main/java/org/apache/gravitino/cli/ErrorMessages.java@@ -19,82 +19,188 @@package org.apache.gravitino.cli;-/* User friendly error messages. */+/** User friendly error messages. */public class ErrorMessages {++ /** Thrown when a catalog already exists. */public static final String CATALOG_EXISTS = "Catalog already exists.";- public static final String COLUMN_EXISTS = "Column already exists.";++ /** Cannot delete the anonymous user, as it may cause unexpected behavior. */public static final String DELETE_ANONYMOUS_USER ="Can't delete anonymous user. This will cause unexpected behavior.";++ /** Thrown when a fileset already exists. */public static final String FILESET_EXISTS = "Fileset already exists.";++ /** Thrown when a group already exists. */public static final String GROUP_EXISTS = "Group already exists.";++ /** Thrown when a metalake already exists. */public static final String METALAKE_EXISTS = "Metalake already exists.";++ /** Thrown when a model already exists. */public static final String MODEL_EXISTS = "Model already exists.";++ /** Thrown when a role already exists. */public static final String ROLE_EXISTS = "Role already exists.";++ /** Thrown when a schema already exists. */public static final String SCHEMA_EXISTS = "Schema already exists.";++ /** Thrown when a table already exists. */public static final String TABLE_EXISTS = "Table already exists.";++ /** Thrown when a tag already exists. */public static final String TAG_EXISTS = "Tag already exists.";++ /** Thrown when a topic already exists. */public static final String TOPIC_EXISTS = "Topic already exists.";++ /** Thrown when a user already exists. */public static final String USER_EXISTS = "User already exists.";+ /** Indicates that the entity is in use and must be disabled before removal. */public static final String ENTITY_IN_USE = " in use, please disable it first.";+ /** Error when both --enable and --disable are used together. */public static final String INVALID_ENABLE_DISABLE ="Unable to use --enable and --disable at the same time.";++ /** Error when both --user and --group are specified together. */public static final String INVALID_OWNER_COMMAND ="Unsupported combination of options either use --user or --group.";++ /** Error when both --name and --property are specified together. */public static final String INVALID_REMOVE_COMMAND ="Unsupported combination of options either use --name or --property.";++ /** Error when invalid option combinations are used for set commands. */public static final String INVALID_SET_COMMAND ="Unsupported combination of options either use --name, --user, --group or --property and --value.";+ /** Thrown when help message cannot be loaded. */public static final String HELP_FAILED = "Failed to load help message: ";+ /** Indicates that the entity name format is invalid. */public static final String MALFORMED_NAME = "Malformed entity name.";++ /** Indicates that the --columnfile option is missing. */public static final String MISSING_COLUMN_FILE = "Missing --columnfile option.";++ /** Indicates that both --comment and --rename options are missing. */public static final String MISSING_COMMENT_AND_RENAME = "Missing --comment and --rename options.";++ /** Indicates that the --datatype option is missing. */public static final String MISSING_DATATYPE = "Missing --datatype option.";++ /** Indicates that required entity names are missing. */public static final String MISSING_ENTITIES = "Missing required entity names: ";+ /** Indicates that the --group option is missing. */public static final String MISSING_GROUP = "Missing --group option.";++ /** Indicates that the --metalake option is missing. */public static final String MISSING_METALAKE = "Missing --metalake option.";++ /** Indicates that the --name option is missing. */public static final String MISSING_NAME = "Missing --name option.";++ /** Indicates that the --privilege option is missing. */public static final String MISSING_PRIVILEGES = "Missing --privilege option.";++ /** Indicates that the --property option is missing. */public static final String MISSING_PROPERTY = "Missing --property option.";++ /** Indicates that both --property and --value options are missing. */public static final String MISSING_PROPERTY_AND_VALUE = "Missing --property and --value options.";++ /** Indicates that the --role option is missing. */public static final String MISSING_ROLE = "Missing --role option.";++ /** Indicates that the --tag option is missing. */public static final String MISSING_TAG = "Missing --tag option.";++ /** Indicates that the --uris option is missing. */public static final String MISSING_URIS = "Missing --uris option.";++ /** Indicates that the --user option is missing. */public static final String MISSING_USER = "Missing --user option.";++ /** Indicates that the --value option is missing. */public static final String MISSING_VALUE = "Missing --value option.";+ /** Error when multiple --alias options are specified. */public static final String MULTIPLE_ALIASES_COMMAND_ERROR ="This command only supports one --alias option.";++ /** Error when multiple --role options are specified. */public static final String MULTIPLE_ROLE_COMMAND_ERROR ="This command only supports one --role option.";++ /** Error when multiple --tag options are specified. */public static final String MULTIPLE_TAG_COMMAND_ERROR ="This command only supports one --tag option.";++ /** Indicates that the --provider option is missing. */public static final String MISSING_PROVIDER = "Missing --provider option.";+ /** Thrown when model registration fails. */public static final String REGISTER_FAILED = "Failed to register model: ";+ /** Thrown when an unknown catalog name is used. */public static final String UNKNOWN_CATALOG = "Unknown catalog name.";++ /** Thrown when an unknown column name is used. */public static final String UNKNOWN_COLUMN = "Unknown column name.";++ /** Thrown when an unknown entity is referenced. */public static final String UNKNOWN_ENTITY = "Unknown entity.";++ /** Thrown when an unknown fileset name is used. */public static final String UNKNOWN_FILESET = "Unknown fileset name.";++ /** Thrown when an unknown group is used. */public static final String UNKNOWN_GROUP = "Unknown group.";++ /** Thrown when an unknown metalake name is used. */public static final String UNKNOWN_METALAKE = "Unknown metalake name.";++ /** Thrown when an unknown model name is used. */public static final String UNKNOWN_MODEL = "Unknown model name.";++ /** Thrown when an unknown model version is used. */public static final String UNKNOWN_MODEL_VERSION = "Unknown model version.";++ /** Thrown when an unknown privilege is used. */public static final String UNKNOWN_PRIVILEGE = "Unknown privilege";++ /** Thrown when an unknown role is used. */public static final String UNKNOWN_ROLE = "Unknown role.";++ /** Thrown when an unknown schema name is used. */public static final String UNKNOWN_SCHEMA = "Unknown schema name.";++ /** Thrown when an unknown table name is used. */public static final String UNKNOWN_TABLE = "Unknown table name.";++ /** Thrown when an unknown tag is used. */public static final String UNKNOWN_TAG = "Unknown tag.";++ /** Thrown when an unknown topic name is used. */public static final String UNKNOWN_TOPIC = "Unknown topic name.";++ /** Thrown when an unknown user is used. */public static final String UNKNOWN_USER = "Unknown user.";+ /** Error while parsing the command line arguments. */public static final String PARSE_ERROR = "Error parsing command line: ";++ /** Indicates that too many arguments were provided. */public static final String TOO_MANY_ARGUMENTS = "Too many arguments.";++ /** Indicates that the entity does not support the requested action. */public static final String UNSUPPORTED_ACTION = "Entity doesn't support this action.";++ /** Indicates that the command is unsupported or unknown. */public static final String UNSUPPORTED_COMMAND = "Unsupported or unknown command.";}diff --git a/clients/cli/src/main/java/org/apache/gravitino/cli/GravitinoCommandLine.java b/clients/cli/src/main/java/org/apache/gravitino/cli/GravitinoCommandLine.javaindex de9ff12d66..e4bcdf6b35 100644--- a/clients/cli/src/main/java/org/apache/gravitino/cli/GravitinoCommandLine.java+++ b/clients/cli/src/main/java/org/apache/gravitino/cli/GravitinoCommandLine.java@@ -28,7 +28,7 @@ import org.apache.commons.cli.CommandLine;import org.apache.commons.cli.HelpFormatter;import org.apache.commons.cli.Options;-/* Gravitino Command line */+/** Gravitino Command line */public class GravitinoCommandLine extends TestableCommandLine {private final CommandLine line;@@ -36,7 +36,9 @@ public class GravitinoCommandLine extends TestableCommandLine {private final String entity;private final String command;- public static final String CMD = "gcli"; // recommended name+ /** Name of the command line tool. */+ public static final String CMD = "gcli";+ /** Default URL for the Gravitino server. */public static final String DEFAULT_URL = "http://localhost:8090";// This joiner is used to join multiple outputs to be displayed, e.g. roles or groupsdiff --git a/clients/cli/src/main/java/org/apache/gravitino/cli/GravitinoOptions.java b/clients/cli/src/main/java/org/apache/gravitino/cli/GravitinoOptions.javaindex a81a322c7e..5492b7af60 100644--- a/clients/cli/src/main/java/org/apache/gravitino/cli/GravitinoOptions.java+++ b/clients/cli/src/main/java/org/apache/gravitino/cli/GravitinoOptions.java@@ -22,58 +22,103 @@ package org.apache.gravitino.cli;import org.apache.commons.cli.Option;import org.apache.commons.cli.Options;-/* Gravitino Command line options */+/** Gravitino Command line options */public class GravitinoOptions {+ /** Represents the audit option. */public static final String AUDIT = "audit";+ /** Represents the auto option. */public static final String AUTO = "auto";+ /** Represents the client option. */public static final String CLIENT = "client";+ /** Represents the columnfile option. */public static final String COLUMNFILE = "columnfile";+ /** Represents the comment option. */public static final String COMMENT = "comment";+ /** Represents the datatype option. */public static final String DATATYPE = "datatype";+ /** Represents the default option. */public static final String DEFAULT = "default";+ /** Represents the distribution option. */public static final String DISTRIBUTION = "distribution";+ /** Represents the fileset option. */public static final String FILESET = "fileset";+ /** Represents the force option. */public static final String FORCE = "force";+ /** Represents the group option. */public static final String GROUP = "group";+ /** Represents the help option. */public static final String HELP = "help";+ /** Represents the option to ignore an operation. */public static final String IGNORE = "ignore";+ /** Represents the index option for a column or property. */public static final String INDEX = "index";+ /** Represents the login option. */public static final String LOGIN = "login";+ /** Represents the metalake option. */public static final String METALAKE = "metalake";+ /** Represents the name of an object. */public static final String NAME = "name";+ /** Represents the nullability option. */public static final String NULL = "null";+ /** Represents the output option for command results. */public static final String OUTPUT = "output";+ /** Represents the owner of an object. */public static final String OWNER = "owner";+ /** Represents the partition option. */public static final String PARTITION = "partition";+ /** Represents the position of a column. */public static final String POSITION = "position";+ /** Represents the privilege option. */public static final String PRIVILEGE = "privilege";+ /** Represents the properties option. */public static final String PROPERTIES = "properties";+ /** Represents a single property option. */public static final String PROPERTY = "property";+ /** Represents the quiet mode option. */public static final String QUIET = "quiet";+ /** Represents the provider option for a catalog. */public static final String PROVIDER = "provider";+ /** Represents the rename option for an object. */public static final String RENAME = "rename";+ /** Represents the role option. */public static final String ROLE = "role";+ /** Represents the server option. */public static final String SERVER = "server";+ /** Represents the simple output format option. */public static final String SIMPLE = "simple";+ /** Represents the sort order option for a column. */public static final String SORTORDER = "sortorder";+ /** Represents the tag option for an object. */public static final String TAG = "tag";+ /** Represents the URL option for a server. */public static final String URL = "url";+ /** Represents the user option for authentication. */public static final String USER = "user";+ /** Represents the value of a property. */public static final String VALUE = "value";+ /** Represents the version of the application. */public static final String VERSION = "version";+ /** Represents the 'all' option. */public static final String ALL = "all";+ /** Represents the enable option. */public static final String ENABLE = "enable";+ /** Represents the disable option. */public static final String DISABLE = "disable";+ /** Represents the alias option for a catalog. */public static final String ALIAS = "alias";+ /** Represents the Uris option for a catalog. */public static final String URIS = "uris";// TODO: temporary option for model version update, it will be refactored in the future, just// prove the E2E flow.+ /** Represents the new uri option for a model version. */public static final String NEW_URI = "newuri";// TODO: temporary option for model version update, it will be refactored in the future, just// prove the E2E flow.+ /** Represents the new alias option for a model version. */public static final String NEW_ALIAS = "newalias";// TODO: temporary option for model version update, it will be refactored in the future, just// prove the E2E flow.+ /** Represents the remove alias option for a model version. */public static final String REMOVE_ALIAS = "removealias";/**diff --git a/clients/cli/src/main/java/org/apache/gravitino/cli/KerberosData.java b/clients/cli/src/main/java/org/apache/gravitino/cli/KerberosData.javaindex 447fdf9424..080e3727fe 100644--- a/clients/cli/src/main/java/org/apache/gravitino/cli/KerberosData.java+++ b/clients/cli/src/main/java/org/apache/gravitino/cli/KerberosData.java@@ -19,8 +19,11 @@package org.apache.gravitino.cli;+/** Represents the Kerberos data required to authenticate with a remote server. */public class KerberosData {+ /** The Kerberos principal (e.g. a user or service identity). */protected final String principal;+ /** The path to the keytab file. */protected final String keytabFile;/**diff --git a/clients/cli/src/main/java/org/apache/gravitino/cli/Main.java b/clients/cli/src/main/java/org/apache/gravitino/cli/Main.javaindex 8c28d7e8a2..ab228360f4 100644--- a/clients/cli/src/main/java/org/apache/gravitino/cli/Main.java+++ b/clients/cli/src/main/java/org/apache/gravitino/cli/Main.java@@ -26,11 +26,20 @@ import org.apache.commons.cli.DefaultParser;import org.apache.commons.cli.Options;import org.apache.commons.cli.ParseException;-/* Entry point for the Gravitino command line. */+/** Entry point for the Gravitino command line. */public class Main {+ /**+ * Flag to indicate whether to use {@link System#exit(int)} or throw a {@link RuntimeException}+ * when exiting the application.+ */public static boolean useExit = true;+ /**+ * Main entry point for the Gravitino command line.+ *+ * @param args the command line arguments+ */public static void main(String[] args) {CommandLineParser parser = new DefaultParser();Options options = new GravitinoOptions().options();diff --git a/clients/cli/src/main/java/org/apache/gravitino/cli/OAuthData.java b/clients/cli/src/main/java/org/apache/gravitino/cli/OAuthData.javaindex 209bd763ea..f0ec01dc32 100644--- a/clients/cli/src/main/java/org/apache/gravitino/cli/OAuthData.java+++ b/clients/cli/src/main/java/org/apache/gravitino/cli/OAuthData.java@@ -19,10 +19,15 @@package org.apache.gravitino.cli;+/** Represents the OAuth data required to authenticate with an OAuth server. */public class OAuthData {+ /** The URI of the OAuth server. */protected final String serverURI;+ /** The credential used for authentication. */protected final String credential;+ /** The access token obtained after authentication. */protected final String token;+ /** The scope of access granted by the OAuth token. */protected final String scope;/**diff --git a/clients/cli/src/main/java/org/apache/gravitino/cli/ParseType.java b/clients/cli/src/main/java/org/apache/gravitino/cli/ParseType.javaindex ee6bf3e079..f452ad0ba7 100644--- a/clients/cli/src/main/java/org/apache/gravitino/cli/ParseType.java+++ b/clients/cli/src/main/java/org/apache/gravitino/cli/ParseType.java@@ -24,6 +24,10 @@ import java.util.regex.Pattern;import org.apache.gravitino.rel.types.Type;import org.apache.gravitino.rel.types.Types;+/**+ * Utility class for parsing and converting data type strings into Gravitino {@link+ * org.apache.gravitino.rel.types.Type} objects.+ */public class ParseType {/**@@ -93,6 +97,13 @@ public class ParseType {throw new IllegalArgumentException("Malformed map type: " + datatype);}+ /**+ * Parses a data type string and returns a {@link org.apache.gravitino.rel.types.Type} object+ * representing the parsed type.+ *+ * @param datatype The data type string to parse.+ * @return a {@link org.apache.gravitino.rel.types.Type} object representing the parsed type.+ */public static Type toType(String datatype) {if (datatype.startsWith("list")) {return toListType(datatype);diff --git a/clients/cli/src/main/java/org/apache/gravitino/cli/ParsedType.java b/clients/cli/src/main/java/org/apache/gravitino/cli/ParsedType.javaindex 6e30c6ed3e..10d5cde78c 100644--- a/clients/cli/src/main/java/org/apache/gravitino/cli/ParsedType.java+++ b/clients/cli/src/main/java/org/apache/gravitino/cli/ParsedType.java@@ -19,6 +19,15 @@package org.apache.gravitino.cli;+/**+ * Represents a parsed data type, encapsulating its name and attributes like length, precision, and+ * scale.+ *+ * <p>This class is a data container used to hold the components of a data type string that has been+ * parsed from a format like "varchar(10)" or "decimal(10,5)". It provides methods to access the+ * extracted type name and its associated attributes, which are mutually exclusive (i.e., a type has+ * either a length or a precision/scale, but not both).+ */public class ParsedType {private String typeName;private Integer length;@@ -39,11 +48,12 @@ public class ParsedType {this.scale = scale;}- /*+ /*** Constructs a ParsedType with specified type name and length.** @param typeName The name of the data type.- * @param length The length of the data type, which typically defines the maximum number of characters.+ * @param length The length of the data type, which typically defines the maximum number of+ * characters.*/public ParsedType(String typeName, Integer length) {this.typeName = typeName;diff --git a/clients/cli/src/main/java/org/apache/gravitino/cli/PositionConverter.java b/clients/cli/src/main/java/org/apache/gravitino/cli/PositionConverter.javaindex 324e70f4b6..7452efd11e 100644--- a/clients/cli/src/main/java/org/apache/gravitino/cli/PositionConverter.java+++ b/clients/cli/src/main/java/org/apache/gravitino/cli/PositionConverter.java@@ -21,6 +21,7 @@ package org.apache.gravitino.cli;import org.apache.gravitino.rel.TableChange;+/** Converts a position string to the appropriate position. */public class PositionConverter {/**diff --git a/clients/cli/src/main/java/org/apache/gravitino/cli/Privileges.java b/clients/cli/src/main/java/org/apache/gravitino/cli/Privileges.javaindex fa90466331..2f6ab79192 100644--- a/clients/cli/src/main/java/org/apache/gravitino/cli/Privileges.java+++ b/clients/cli/src/main/java/org/apache/gravitino/cli/Privileges.java@@ -22,22 +22,42 @@ package org.apache.gravitino.cli;import java.util.HashSet;import org.apache.gravitino.authorization.Privilege;+/**+ * This class contains the list of valid privileges and methods to check if a given privilege is+ * valid.+ */public class Privileges {+ /** Represents the privilege to create a catalog. */public static final String CREATE_CATALOG = "create_catalog";+ /** Represents the privilege to use a catalog. */public static final String USE_CATALOG = "use_catalog";+ /** Represents the privilege to create a schema. */public static final String CREATE_SCHEMA = "create_schema";+ /** Represents the privilege to use a schema. */public static final String USE_SCHEMA = "use_schema";+ /** Represents the privilege to create a table. */public static final String CREATE_TABLE = "create_table";+ /** Represents the privilege to modify a table. */public static final String MODIFY_TABLE = "modify_table";+ /** Represents the privilege to select from a table. */public static final String SELECT_TABLE = "select_table";+ /** Represents the privilege to create a fileset. */public static final String CREATE_FILESET = "create_fileset";+ /** Represents the privilege to write to a fileset. */public static final String WRITE_FILESET = "write_fileset";+ /** Represents the privilege to read from a fileset. */public static final String READ_FILESET = "read_fileset";+ /** Represents the privilege to create a topic. */public static final String CREATE_TOPIC = "create_topic";+ /** Represents the privilege to produce to a topic. */public static final String PRODUCE_TOPIC = "produce_topic";+ /** Represents the privilege to consume from a topic. */public static final String CONSUME_TOPIC = "consume_topic";+ /** Represents the privilege to manage users. */public static final String MANAGE_USERS = "manage_users";+ /** Represents the privilege to create a role. */public static final String CREATE_ROLE = "create_role";+ /** Represents the privilege to manage grants. */public static final String MANAGE_GRANTS = "manage_grants";private static final HashSet<String> VALID_PRIVILEGES = new HashSet<>();diff --git a/clients/cli/src/main/java/org/apache/gravitino/cli/Providers.java b/clients/cli/src/main/java/org/apache/gravitino/cli/Providers.javaindex 174d2a2a02..e8e728ed20 100644--- a/clients/cli/src/main/java/org/apache/gravitino/cli/Providers.java+++ b/clients/cli/src/main/java/org/apache/gravitino/cli/Providers.java@@ -27,16 +27,27 @@ import org.apache.gravitino.Catalog;* Gravitino CLI. It also can validate if a given entity is a valid entity.*/public class Providers {+ /** Represents the Hive provider. */public static final String HIVE = "hive";+ /** Represents the Hadoop provider. */public static final String HADOOP = "hadoop";+ /** Represents the Iceberg provider. */public static final String ICEBERG = "iceberg";+ /** Represents the MySQL provider. */public static final String MYSQL = "mysql";+ /** Represents the Postgres provider. */public static final String POSTGRES = "postgres";+ /** Represents the Kafka provider. */public static final String KAFKA = "kafka";+ /** Represents the Doris provider. */public static final String DORIS = "doris";+ /** Represents the paimon provider. */public static final String PAIMON = "paimon";+ /** Represents the Hudi provider. */public static final String HUDI = "hudi";+ /** Represents the OceanBase provider. */public static final String OCEANBASE = "oceanbase";+ /** Represents the Model provider. */public static final String MODEL = "model";private static final HashSet<String> VALID_PROVIDERS = new HashSet<>();@@ -65,6 +76,12 @@ public class Providers {return VALID_PROVIDERS.contains(provider);}+ /**+ * Returns the internal name of a given provider.+ *+ * @param provider The provider to get the internal name for.+ * @return The internal name of the provider.+ */public static String internal(String provider) {switch (provider) {case HIVE:@@ -94,6 +111,12 @@ public class Providers {}}+ /**+ * Returns the catalog type for a given provider.+ *+ * @param provider The provider to get the catalog type for.+ * @return The catalog type for the provider.+ */public static Catalog.Type catalogType(String provider) {switch (provider) {case HADOOP:diff --git a/clients/cli/src/main/java/org/apache/gravitino/cli/ReadTableCSV.java b/clients/cli/src/main/java/org/apache/gravitino/cli/ReadTableCSV.javaindex dc9f3a9f2e..eefeef02c9 100644--- a/clients/cli/src/main/java/org/apache/gravitino/cli/ReadTableCSV.java+++ b/clients/cli/src/main/java/org/apache/gravitino/cli/ReadTableCSV.java@@ -34,6 +34,7 @@ import org.apache.commons.csv.CSVParser;import org.apache.commons.csv.CSVRecord;import org.apache.gravitino.rel.Column;+/** This class reads a CSV file and converts it to a list of columns. */public class ReadTableCSV {private enum ExpectedColumns {@@ -56,6 +57,12 @@ public class ReadTableCSV {}}+ /**+ * Converts a CSV file to a list of columns.+ *+ * @param tableData a map of column names to lists of values+ * @return a list of columns+ */public Column[] columns(Map<String, List<String>> tableData) {List<String> names = tableData.get(ExpectedColumns.NAME.getName());List<String> datatypes = tableData.get(ExpectedColumns.DATATYPE.getName());@@ -94,6 +101,12 @@ public class ReadTableCSV {return columns;}+ /**+ * Parses a CSV file and returns a map of column names to lists of values.+ *+ * @param csvFile the CSV file to parse+ * @return a map of column names to lists of values+ */public Map<String, List<String>> parse(String csvFile) {// Initialize a Map to store each column's values in a listdiff --git a/clients/cli/src/main/java/org/apache/gravitino/cli/RoleCommandHandler.java b/clients/cli/src/main/java/org/apache/gravitino/cli/RoleCommandHandler.javaindex f9e654cc43..3d57608094 100644--- a/clients/cli/src/main/java/org/apache/gravitino/cli/RoleCommandHandler.java+++ b/clients/cli/src/main/java/org/apache/gravitino/cli/RoleCommandHandler.java@@ -23,6 +23,7 @@ import java.util.Arrays;import org.apache.commons.cli.CommandLine;import org.apache.gravitino.cli.commands.Command;+/** Handles the role command execution logic. */public class RoleCommandHandler extends CommandHandler {private final GravitinoCommandLine gravitinoCommandLine;@@ -33,6 +34,14 @@ public class RoleCommandHandler extends CommandHandler {private String[] roles;private String[] privileges;+ /**+ * Create a new instance of the RoleCommandHandler.+ *+ * @param gravitinoCommandLine the main command line object+ * @param line the parsed command line object+ * @param command the command name+ * @param context the command context+ */public RoleCommandHandler(GravitinoCommandLine gravitinoCommandLine,CommandLine line,diff --git a/clients/cli/src/main/java/org/apache/gravitino/cli/SchemaCommandHandler.java b/clients/cli/src/main/java/org/apache/gravitino/cli/SchemaCommandHandler.javaindex 149746c0ec..6b0bf09b13 100644--- a/clients/cli/src/main/java/org/apache/gravitino/cli/SchemaCommandHandler.java+++ b/clients/cli/src/main/java/org/apache/gravitino/cli/SchemaCommandHandler.java@@ -24,6 +24,7 @@ import java.util.List;import org.apache.commons.cli.CommandLine;import org.apache.gravitino.cli.commands.Command;+/** Handler for the "schema" command. */public class SchemaCommandHandler extends CommandHandler {private final GravitinoCommandLine gravitinoCommandLine;diff --git a/clients/cli/src/main/java/org/apache/gravitino/cli/TagCommandHandler.java b/clients/cli/src/main/java/org/apache/gravitino/cli/TagCommandHandler.javaindex a5963d26dd..5371a2caf1 100644--- a/clients/cli/src/main/java/org/apache/gravitino/cli/TagCommandHandler.java+++ b/clients/cli/src/main/java/org/apache/gravitino/cli/TagCommandHandler.java@@ -22,6 +22,7 @@ import java.util.Arrays;import org.apache.commons.cli.CommandLine;import org.apache.gravitino.cli.commands.Command;+/** Handler for the "tag" command. */public class TagCommandHandler extends CommandHandler {private final GravitinoCommandLine gravitinoCommandLine;private final CommandLine line;@@ -30,6 +31,14 @@ public class TagCommandHandler extends CommandHandler {private String[] tags;private String metalake;+ /**+ * Create a new instance of TagCommandHandler.+ *+ * @param gravitinoCommandLine The main command line object.+ * @param line The command line object for the tag command.+ * @param command The command name.+ * @param context The command context.+ */public TagCommandHandler(GravitinoCommandLine gravitinoCommandLine,CommandLine line,diff --git a/clients/cli/src/main/java/org/apache/gravitino/cli/TestableCommandLine.java b/clients/cli/src/main/java/org/apache/gravitino/cli/TestableCommandLine.javaindex becdf61767..1ae6558aa8 100644--- a/clients/cli/src/main/java/org/apache/gravitino/cli/TestableCommandLine.java+++ b/clients/cli/src/main/java/org/apache/gravitino/cli/TestableCommandLine.java@@ -149,80 +149,202 @@ import org.apache.gravitino.cli.commands.UpdateTopicComment;import org.apache.gravitino.cli.commands.UserAudit;import org.apache.gravitino.cli.commands.UserDetails;-/*+/*** Methods used for testing*- * Basically a seam where we can see what is passed and use mocks to see if the correct command is created.+ * <p>Basically a seam where we can see what is passed and use mocks to see if the correct command+ * is created.*/public class TestableCommandLine {+ /**+ * Get a new instance of AddColumn command.+ *+ * @param context the command context+ * @return a new instance of AddColumn command+ */protected ClientVersion newClientVersion(CommandContext context) {return new ClientVersion(context);}+ /**+ * Get a new instance of ServerVersion command.+ *+ * @param context The command context+ * @return a new instance of ServerVersion command+ */protected ServerVersion newServerVersion(CommandContext context) {return new ServerVersion(context);}+ /**+ * Get a new instance of Metalake audit command.+ *+ * @param context The command context+ * @param metalake The name of the metalake+ * @return a new instance of Metalake audit command+ */protected MetalakeAudit newMetalakeAudit(CommandContext context, String metalake) {return new MetalakeAudit(context, metalake);}+ /**+ * Get a new instance of Metalake details command.+ *+ * @param context The command context+ * @param metalake The name of the metalake+ * @return a new instance of Metalake details command+ */protected MetalakeDetails newMetalakeDetails(CommandContext context, String metalake) {return new MetalakeDetails(context, metalake);}+ /**+ * Get a new instance of Metalake list command.+ *+ * @param context The command context+ * @return a new instance of Metalake list command+ */protected ListMetalakes newListMetalakes(CommandContext context) {return new ListMetalakes(context);}+ /**+ * Get a new instance of Metalake create command.+ *+ * @param context The command context+ * @param metalake The name of the metalake+ * @param comment The comment for the metalake+ * @return a new instance of Metalake create command+ */protected CreateMetalake newCreateMetalake(CommandContext context, String metalake, String comment) {return new CreateMetalake(context, metalake, comment);}+ /**+ * Get a new instance of Metalake delete command.+ *+ * @param context The command context+ * @param metalake The name of the metalake+ * @return a new instance of Metalake delete command+ */protected DeleteMetalake newDeleteMetalake(CommandContext context, String metalake) {return new DeleteMetalake(context, metalake);}+ /**+ * Get a new instance of Metalake set property command.+ *+ * @param context The command context+ * @param metalake The name of the metalake+ * @param property The property to set+ * @param value The value to set+ * @return a new instance of Metalake set property command+ */protected SetMetalakeProperty newSetMetalakeProperty(CommandContext context, String metalake, String property, String value) {return new SetMetalakeProperty(context, metalake, property, value);}+ /**+ * Get a new instance of Metalake remove property command.+ *+ * @param context The command context+ * @param metalake The name of the metalake+ * @param property The property to remove+ * @return a new instance of Metalake remove property command+ */protected RemoveMetalakeProperty newRemoveMetalakeProperty(CommandContext context, String metalake, String property) {return new RemoveMetalakeProperty(context, metalake, property);}+ /**+ * Get a new instance of Metalake list properties command.+ *+ * @param context The command context+ * @param metalake The name of the metalake+ * @return a new instance of Metalake list properties command+ */protected ListMetalakeProperties newListMetalakeProperties(CommandContext context, String metalake) {return new ListMetalakeProperties(context, metalake);}+ /**+ * Get a new instance of Metalake update comment command.+ *+ * @param context The command context+ * @param metalake The name of the metalake+ * @param comment The new comment for the metalake+ * @return a new instance of Metalake update comment command+ */protected UpdateMetalakeComment newUpdateMetalakeComment(CommandContext context, String metalake, String comment) {return new UpdateMetalakeComment(context, metalake, comment);}+ /**+ * Get a new instance of Metalake update name command.+ *+ * @param context The command context+ * @param metalake The name of the metalake+ * @param newName The new name for the metalake+ * @return a new instance of Metalake update name command+ */protected UpdateMetalakeName newUpdateMetalakeName(CommandContext context, String metalake, String newName) {return new UpdateMetalakeName(context, metalake, newName);}+ /**+ * Get a new instance of Metalake audit command.+ *+ * @param context The command context+ * @param metalake The name of the metalake+ * @param catalog The name of the catalog+ * @return a new instance of Metalake audit command+ */protected CatalogAudit newCatalogAudit(CommandContext context, String metalake, String catalog) {return new CatalogAudit(context, metalake, catalog);}+ /**+ * GEt a new instance of Metalake details command.+ *+ * @param context The command context+ * @param metalake The name of the metalake+ * @param catalog The name of the catalog+ * @return a new instance of Metalake details command+ */protected CatalogDetails newCatalogDetails(CommandContext context, String metalake, String catalog) {return new CatalogDetails(context, metalake, catalog);}+ /**+ * Get a new instance of Metalake list command.+ *+ * @param context The command context+ * @param metalake The name of the metalake+ * @return a new instance of Metalake list command+ */protected ListCatalogs newListCatalogs(CommandContext context, String metalake) {return new ListCatalogs(context, metalake);}+ /**+ * Get a new instance of Metalake create command.+ *+ * @param context The command context+ * @param metalake The name of the metalake+ * @param catalog The name of the catalog+ * @param provider The provider for the catalog+ * @param comment The comment for the catalog+ * @param properties The properties for the catalog+ * @return a new instance of Metalake create command+ */protected CreateCatalog newCreateCatalog(CommandContext context,String metalake,@@ -233,60 +355,169 @@ public class TestableCommandLine {return new CreateCatalog(context, metalake, catalog, provider, comment, properties);}+ /**+ * Get a new instance of Metalake delete command.+ *+ * @param context The command context+ * @param metalake The name of the metalake+ * @param catalog The name of the catalog+ * @return a new instance of Metalake delete command+ */protected DeleteCatalog newDeleteCatalog(CommandContext context, String metalake, String catalog) {return new DeleteCatalog(context, metalake, catalog);}+ /**+ * Get a new instance of Metalake set property command.+ *+ * @param context The command context+ * @param metalake The name of the metalake+ * @param catalog The name of the catalog+ * @param property The property to set+ * @param value The value to set+ * @return a new instance of Metalake set property command+ */protected SetCatalogProperty newSetCatalogProperty(CommandContext context, String metalake, String catalog, String property, String value) {return new SetCatalogProperty(context, metalake, catalog, property, value);}+ /**+ * Get a new instance of Metalake remove property command.+ *+ * @param context The command context+ * @param metalake The name of the metalake+ * @param catalog The name of the catalog+ * @param property The property to remove+ * @return a new instance of Metalake remove property command+ */protected RemoveCatalogProperty newRemoveCatalogProperty(CommandContext context, String metalake, String catalog, String property) {return new RemoveCatalogProperty(context, metalake, catalog, property);}+ /**+ * Get a new instance of catalog list properties command.+ *+ * @param context The command context+ * @param metalake The name of the metalake+ * @param catalog The name of the catalog+ * @return a new instance of catalog list properties command+ */protected ListCatalogProperties newListCatalogProperties(CommandContext context, String metalake, String catalog) {return new ListCatalogProperties(context, metalake, catalog);}+ /**+ * Get a new instance of Catalog update comment command.+ *+ * @param context The command context+ * @param metalake The name of the metalake+ * @param catalog The name of the catalog+ * @param comment The new comment for the catalog+ * @return a new instance of catalog update comment command+ */protected UpdateCatalogComment newUpdateCatalogComment(CommandContext context, String metalake, String catalog, String comment) {return new UpdateCatalogComment(context, metalake, catalog, comment);}+ /**+ * Get a new instance of Catalog update name command.+ *+ * @param context The command context+ * @param metalake The name of the metalake+ * @param catalog The name of the catalog+ * @param newName The new name for the catalog+ * @return a new instance of catalog update name command+ */protected UpdateCatalogName newUpdateCatalogName(CommandContext context, String metalake, String catalog, String newName) {return new UpdateCatalogName(context, metalake, catalog, newName);}+ /**+ * Get a new instance of schema audit command.+ *+ * @param context The command context+ * @param metalake The name of the metalake+ * @param catalog The name of the catalog+ * @param schema The name of the schema+ * @return a new instance of schema audit command+ */protected SchemaAudit newSchemaAudit(CommandContext context, String metalake, String catalog, String schema) {return new SchemaAudit(context, metalake, catalog, schema);}+ /**+ * Get a new instance of schema details command.+ *+ * @param context The command context+ * @param metalake The name of the metalake+ * @param catalog The name of the catalog+ * @param schema The name of the schema+ * @return a new instance of schema details command+ */protected SchemaDetails newSchemaDetails(CommandContext context, String metalake, String catalog, String schema) {return new SchemaDetails(context, metalake, catalog, schema);}+ /**+ * Get a new instance of schema list command.+ *+ * @param context The command context+ * @param metalake The name of the metalake+ * @param catalog The name of the catalog+ * @return a new instance of schema list command+ */protected ListSchema newListSchema(CommandContext context, String metalake, String catalog) {return new ListSchema(context, metalake, catalog);}+ /**+ * Get a new instance of schema create command.+ *+ * @param context The command context+ * @param metalake The name of the metalake+ * @param catalog The name of the catalog+ * @param schema The name of the schema+ * @param comment The comment for the schema+ * @return a new instance of schema create command+ */protected CreateSchema newCreateSchema(CommandContext context, String metalake, String catalog, String schema, String comment) {return new CreateSchema(context, metalake, catalog, schema, comment);}+ /**+ * Get a new instance of schema delete command.+ *+ * @param context The command context+ * @param metalake The name of the metalake+ * @param catalog The name of the catalog+ * @param schema The name of the schema+ * @return a new instance of schema delete command+ */protected DeleteSchema newDeleteSchema(CommandContext context, String metalake, String catalog, String schema) {return new DeleteSchema(context, metalake, catalog, schema);}+ /**+ * Get a new instance of schema set property command.+ *+ * @param context The command context+ * @param metalake The name of the metalake+ * @param catalog The name of the catalog+ * @param schema The name of the schema+ * @param property The property to set+ * @param value The value to set+ * @return a new instance of schema set property command+ */protected SetSchemaProperty newSetSchemaProperty(CommandContext context,String metalake,@@ -297,56 +528,150 @@ public class TestableCommandLine {return new SetSchemaProperty(context, metalake, catalog, schema, property, value);}+ /**+ * Get a new instance of schema remove property command.+ *+ * @param context The command context+ * @param metalake The name of the metalake+ * @param catalog The name of the catalog+ * @param schema The name of the schema+ * @param property The property to remove+ * @return a new instance of schema remove property command+ */protected RemoveSchemaProperty newRemoveSchemaProperty(CommandContext context, String metalake, String catalog, String schema, String property) {return new RemoveSchemaProperty(context, metalake, catalog, schema, property);}+ /**+ * Get a new instance of schema list properties command.+ *+ * @param context The command context+ * @param metalake The name of the metalake+ * @param catalog The name of the catalog+ * @param schema The name of the schema+ * @return a new instance of schema list properties command+ */protected ListSchemaProperties newListSchemaProperties(CommandContext context, String metalake, String catalog, String schema) {return new ListSchemaProperties(context, metalake, catalog, schema);}+ /**+ * Get a new instance of schema update comment command.+ *+ * @param context The command context+ * @param metalake The name of the metalake+ * @param catalog The name of the catalog+ * @param schema The name of the schema+ * @param table The name of the table+ * @return a new instance of schema update comment command+ */protected TableAudit newTableAudit(CommandContext context, String metalake, String catalog, String schema, String table) {return new TableAudit(context, metalake, catalog, schema, table);}+ /**+ * Get a new instance of table details command.+ *+ * @param context The command context+ * @param metalake The name of the metalake+ * @param catalog The name of the catalog+ * @param schema The name of the schema+ * @param table The name of the table+ * @return a new instance of table details command+ */protected TableDetails newTableDetails(CommandContext context, String metalake, String catalog, String schema, String table) {return new TableDetails(context, metalake, catalog, schema, table);}-- protected ListTables newListTables(- CommandContext context, String metalake, String catalog, String schema) {- return new ListTables(context, metalake, catalog, schema);- }-+ /**+ * Get a new instance of table delete command.+ *+ * @param context The command context+ * @param metalake The name of the metalake+ * @param catalog The name of the catalog+ * @param schema The name of the schema+ * @param table The name of the table+ * @return a new instance of table delete command+ */protected DeleteTable newDeleteTable(CommandContext context, String metalake, String catalog, String schema, String table) {return new DeleteTable(context, metalake, catalog, schema, table);}+ /**+ * Get a new instance of table index list command.+ *+ * @param context The command context+ * @param metalake The name of the metalake+ * @param catalog The name of the catalog+ * @param schema The name of the schema+ * @param table The name of the table+ * @return a new instance of table index list command+ */protected ListIndexes newListIndexes(CommandContext context, String metalake, String catalog, String schema, String table) {return new ListIndexes(context, metalake, catalog, schema, table);}+ /**+ * Get a new instance of table partition command.+ *+ * @param context The command context+ * @param metalake The name of the metalake+ * @param catalog The name of the catalog+ * @param schema The name of the schema+ * @param table The name of the table+ * @return a new instance of table partition command+ */protected TablePartition newTablePartition(CommandContext context, String metalake, String catalog, String schema, String table) {return new TablePartition(context, metalake, catalog, schema, table);}+ /**+ * Get a new instance of table distribution command.+ *+ * @param context The command context+ * @param metalake The name of the metalake+ * @param catalog The name of the catalog+ * @param schema The name of the schema+ * @param table The name of the table+ * @return a new instance of table distribution command+ */protected TableDistribution newTableDistribution(CommandContext context, String metalake, String catalog, String schema, String table) {return new TableDistribution(context, metalake, catalog, schema, table);}+ /**+ * Get a new instance of table sort order command.+ *+ * @param context The command context+ * @param metalake The name of the metalake+ * @param catalog The name of the catalog+ * @param schema The name of the schema+ * @param table The name of the table+ * @return a new instance of table sort order command+ */protected TableSortOrder newTableSortOrder(CommandContext context, String metalake, String catalog, String schema, String table) {return new TableSortOrder(context, metalake, catalog, schema, table);}+ /**+ * Get a new instance of update table comment command.+ *+ * @param context The command context+ * @param metalake The name of the metalake+ * @param catalog The name of the catalog+ * @param schema The name of the schema+ * @param table The name of the table+ * @param comment The new comment for the table+ * @return a new instance of update table comment command+ */protected UpdateTableComment newUpdateTableComment(CommandContext context,String metalake,@@ -357,6 +682,17 @@ public class TestableCommandLine {return new UpdateTableComment(context, metalake, catalog, schema, table, comment);}+ /**+ * Get a new instance of update table name command.+ *+ * @param context The command context+ * @param metalake The name of the metalake+ * @param catalog The name of the catalog+ * @param schema The name of the schema+ * @param table The current name of the table+ * @param rename The new name of the table+ * @return a new instance of update table name command+ */protected UpdateTableName newUpdateTableName(CommandContext context,String metalake,@@ -367,6 +703,18 @@ public class TestableCommandLine {return new UpdateTableName(context, metalake, catalog, schema, table, rename);}+ /**+ * Get a new instance of set table property command.+ *+ * @param context The command context+ * @param metalake The name of the metalake+ * @param catalog The name of the catalog+ * @param schema The name of the schema+ * @param table The name of the table+ * @param property The property key+ * @param value The property value+ * @return a new instance of set table property command+ */protected SetTableProperty newSetTableProperty(CommandContext context,String metalake,@@ -378,6 +726,17 @@ public class TestableCommandLine {return new SetTableProperty(context, metalake, catalog, schema, table, property, value);}+ /**+ * Get a new instance of remove table property command.+ *+ * @param context The command context+ * @param metalake The name of the metalake+ * @param catalog The name of the catalog+ * @param schema The name of the schema+ * @param table The name of the table+ * @param property The property key to remove+ * @return a new instance of remove table property command+ */protected RemoveTableProperty newRemoveTableProperty(CommandContext context,String metalake,@@ -388,157 +747,451 @@ public class TestableCommandLine {return new RemoveTableProperty(context, metalake, catalog, schema, table, property);}+ /**+ * Get a new instance of list table properties command.+ *+ * @param context The command context+ * @param metalake The name of the metalake+ * @param catalog The name of the catalog+ * @param schema The name of the schema+ * @param table The name of the table+ * @return a new instance of list table properties command+ */protected ListTableProperties newListTableProperties(CommandContext context, String metalake, String catalog, String schema, String table) {return new ListTableProperties(context, metalake, catalog, schema, table);}+ /**+ * Get a new instance of user details command.+ *+ * @param context The command context+ * @param metalake The name of the metalake+ * @param user The user name+ * @return a new instance of user details command+ */protected UserDetails newUserDetails(CommandContext context, String metalake, String user) {return new UserDetails(context, metalake, user);}+ /**+ * Get a new instance of list users command.+ *+ * @param context The command context+ * @param metalake The name of the metalake+ * @return a new instance of list users command+ */protected ListUsers newListUsers(CommandContext context, String metalake) {return new ListUsers(context, metalake);}+ /**+ * Get a new instance of user audit command.+ *+ * @param context The command context+ * @param metalake The name of the metalake+ * @param user The user name+ * @return a new instance of user audit command+ */protected UserAudit newUserAudit(CommandContext context, String metalake, String user) {return new UserAudit(context, metalake, user);}+ /**+ * Get a new instance of create user command.+ *+ * @param context The command context+ * @param metalake The name of the metalake+ * @param user The user name+ * @return a new instance of create user command+ */protected CreateUser newCreateUser(CommandContext context, String metalake, String user) {return new CreateUser(context, metalake, user);}+ /**+ * Get a new instance of delete user command.+ *+ * @param context The command context+ * @param metalake The name of the metalake+ * @param user The user name+ * @return a new instance of delete user command+ */protected DeleteUser newDeleteUser(CommandContext context, String metalake, String user) {return new DeleteUser(context, metalake, user);}+ /**+ * Get a new instance of remove role from user command.+ *+ * @param context The command context+ * @param metalake The name of the metalake+ * @param user The user name+ * @param role The role name+ * @return a new instance of remove role from user command+ */protected RemoveRoleFromUser newRemoveRoleFromUser(CommandContext context, String metalake, String user, String role) {return new RemoveRoleFromUser(context, metalake, user, role);}+ /**+ * Get a new instance of add role to user command.+ *+ * @param context The command context+ * @param metalake The name of the metalake+ * @param user The user name+ * @param role The role name+ * @return a new instance of add role to user command+ */protected AddRoleToUser newAddRoleToUser(CommandContext context, String metalake, String user, String role) {return new AddRoleToUser(context, metalake, user, role);}+ /**+ * Get a new instance of group details command.+ *+ * @param context The command context+ * @param metalake The name of the metalake+ * @param user The group name+ * @return a new instance of group details command+ */protected GroupDetails newGroupDetails(CommandContext context, String metalake, String user) {return new GroupDetails(context, metalake, user);}+ /**+ * Get a new instance of list groups command.+ *+ * @param context The command context+ * @param metalake The name of the metalake+ * @return a new instance of list groups command+ */protected ListGroups newListGroups(CommandContext context, String metalake) {return new ListGroups(context, metalake);}+ /**+ * Get a new instance of group audit command.+ *+ * @param context The command context+ * @param metalake The name of the metalake+ * @param group The name of the group+ * @return a new instance of group audit command+ */protected GroupAudit newGroupAudit(CommandContext context, String metalake, String group) {return new GroupAudit(context, metalake, group);}+ /**+ * Get a new instance of create group command.+ *+ * @param context The command context+ * @param metalake The name of the metalake+ * @param user The name of the user to be added in the group+ * @return a new instance of create group command+ */protected CreateGroup newCreateGroup(CommandContext context, String metalake, String user) {return new CreateGroup(context, metalake, user);}+ /**+ * Get a new instance of delete group command.+ *+ * @param context The command context+ * @param metalake The name of the metalake+ * @param user The name of the user belonging to the group+ * @return a new instance of delete group command+ */protected DeleteGroup newDeleteGroup(CommandContext context, String metalake, String user) {return new DeleteGroup(context, metalake, user);}+ /**+ * Get a new instance of remove role from group command.+ *+ * @param context The command context+ * @param metalake The name of the metalake+ * @param group The name of the group+ * @param role The role to be removed from the group+ * @return a new instance of remove role from group command+ */protected RemoveRoleFromGroup newRemoveRoleFromGroup(CommandContext context, String metalake, String group, String role) {return new RemoveRoleFromGroup(context, metalake, group, role);}+ /**+ * Get a new instance of remove all roles command for an entity.+ *+ * @param context The command context+ * @param metalake The name of the metalake+ * @param entity The entity name+ * @param entityType The type of the entity (user or group)+ * @return a new instance of remove all roles command+ */protected RemoveAllRoles newRemoveAllRoles(CommandContext context, String metalake, String entity, String entityType) {return new RemoveAllRoles(context, metalake, entity, entityType);}+ /**+ * Get a new instance of add role to group command.+ *+ * @param context The command context+ * @param metalake The name of the metalake+ * @param group The name of the group+ * @param role The role to be added+ * @return a new instance of add role to group command+ */protected AddRoleToGroup newAddRoleToGroup(CommandContext context, String metalake, String group, String role) {return new AddRoleToGroup(context, metalake, group, role);}+ /**+ * Get a new instance of role details command.+ *+ * @param context The command context+ * @param metalake The name of the metalake+ * @param role The name of the role+ * @return a new instance of role details command+ */protected RoleDetails newRoleDetails(CommandContext context, String metalake, String role) {return new RoleDetails(context, metalake, role);}+ /**+ * Get a new instance of list roles command.+ *+ * @param context The command context+ * @param metalake The name of the metalake+ * @return a new instance of list roles command+ */protected ListRoles newListRoles(CommandContext context, String metalake) {return new ListRoles(context, metalake);}+ /**+ * Get a new instance of role audit command.+ *+ * @param context The command context+ * @param metalake The name of the metalake+ * @param role The name of the role+ * @return a new instance of role audit command+ */protected RoleAudit newRoleAudit(CommandContext context, String metalake, String role) {return new RoleAudit(context, metalake, role);}+ /**+ * Get a new instance of create role command.+ *+ * @param context The command context+ * @param metalake The name of the metalake+ * @param roles The array of roles to be created+ * @return a new instance of create role command+ */protected CreateRole newCreateRole(CommandContext context, String metalake, String[] roles) {return new CreateRole(context, metalake, roles);}+ /**+ * Get a new instance of delete role command.+ *+ * @param context The command context+ * @param metalake The name of the metalake+ * @param roles The array of roles to be deleted+ * @return a new instance of delete role command+ */protected DeleteRole newDeleteRole(CommandContext context, String metalake, String[] roles) {return new DeleteRole(context, metalake, roles);}+ /**+ * Get a new instance of tag details command.+ *+ * @param context The command context+ * @param metalake The name of the metalake+ * @param tag The name of the tag+ * @return a new instance of tag details command+ */protected TagDetails newTagDetails(CommandContext context, String metalake, String tag) {return new TagDetails(context, metalake, tag);}+ /**+ * Get a new instance of list all tags command.+ *+ * @param context The command context+ * @param metalake The name of the metalake+ * @return a new instance of list all tags command+ */protected ListAllTags newListTags(CommandContext context, String metalake) {return new ListAllTags(context, metalake);}+ /**+ * Get a new instance of create tag command.+ *+ * @param context The command context+ * @param metalake The name of the metalake+ * @param tags The array of tags to be created+ * @param comment The comment associated with the tag+ * @return a new instance of create tag command+ */protected CreateTag newCreateTags(CommandContext context, String metalake, String[] tags, String comment) {return new CreateTag(context, metalake, tags, comment);}+ /**+ * Get a new instance of delete tag command.+ *+ * @param context The command context+ * @param metalake The name of the metalake+ * @param tags The array of tags to be deleted+ * @return a new instance of delete tag command+ */protected DeleteTag newDeleteTag(CommandContext context, String metalake, String[] tags) {return new DeleteTag(context, metalake, tags);}+ /**+ * Get a new instance of set tag property command.+ *+ * @param context The command context+ * @param metalake The name of the metalake+ * @param tag The name of the tag+ * @param property The property key+ * @param value The property value+ * @return a new instance of set tag property command+ */protected SetTagProperty newSetTagProperty(CommandContext context, String metalake, String tag, String property, String value) {return new SetTagProperty(context, metalake, tag, property, value);}+ /**+ * Get a new instance of remove tag property command.+ *+ * @param context The command context+ * @param metalake The name of the metalake+ * @param tag The name of the tag+ * @param property The property key to be removed+ * @return a new instance of remove tag property command+ */protected RemoveTagProperty newRemoveTagProperty(CommandContext context, String metalake, String tag, String property) {return new RemoveTagProperty(context, metalake, tag, property);}+ /**+ * Get a new instance of remove all tags command from an entity.+ *+ * @param context The command context+ * @param metalake The name of the metalake+ * @param name The full name of the entity+ * @return a new instance of remove all tags command+ */protected RemoveAllTags newRemoveAllTags(CommandContext context, String metalake, FullName name) {return new RemoveAllTags(context, metalake, name);}+ /**+ * Get a new instance of list tag properties command.+ *+ * @param context The command context+ * @param metalake The name of the metalake+ * @param tag The name of the tag+ * @return a new instance of list tag properties command+ */protected ListTagProperties newListTagProperties(CommandContext context, String metalake, String tag) {return new ListTagProperties(context, metalake, tag);}+ /**+ * Get a new instance of update tag comment command.+ *+ * @param context The command context+ * @param metalake The name of the metalake+ * @param tag The name of the tag+ * @param comment The new comment+ * @return a new instance of update tag comment command+ */protected UpdateTagComment newUpdateTagComment(CommandContext context, String metalake, String tag, String comment) {return new UpdateTagComment(context, metalake, tag, comment);}+ /**+ * Get a new instance of update tag name command.+ *+ * @param context The command context+ * @param metalake The name of the metalake+ * @param tag The old tag name+ * @param newName The new tag name+ * @return a new instance of update tag name command+ */protected UpdateTagName newUpdateTagName(CommandContext context, String metalake, String tag, String newName) {return new UpdateTagName(context, metalake, tag, newName);}+ /**+ * Get a new instance of list entity tags command.+ *+ * @param context The command context+ * @param metalake The name of the metalake+ * @param name The full name of the entity+ * @return a new instance of list entity tags command+ */protected ListEntityTags newListEntityTags(CommandContext context, String metalake, FullName name) {return new ListEntityTags(context, metalake, name);}+ /**+ * Get a new instance of tag entity command.+ *+ * @param context The command context+ * @param metalake The name of the metalake+ * @param name The full name of the entity+ * @param tags The array of tags to be associated+ * @return a new instance of tag entity command+ */protected TagEntity newTagEntity(CommandContext context, String metalake, FullName name, String[] tags) {return new TagEntity(context, metalake, name, tags);}+ /**+ * Get a new instance of untag entity command.+ *+ * @param context The command context+ * @param metalake The name of the metalake+ * @param name The full name of the entity+ * @param tags The array of tags to be removed+ * @return a new instance of untag entity command+ */protected UntagEntity newUntagEntity(CommandContext context, String metalake, FullName name, String[] tags) {return new UntagEntity(context, metalake, name, tags);}+ /**+ * Create a new {@link ColumnAudit} command to audit a specific column.+ *+ * @param context the command execution context+ * @param metalake the target metalake name+ * @param catalog the target catalog name+ * @param schema the target schema name+ * @param table the target table name+ * @param column the target column name+ * @return a new {@link ColumnAudit} command instance+ */protected ColumnAudit newColumnAudit(CommandContext context,String metalake,@@ -549,11 +1202,32 @@ public class TestableCommandLine {return new ColumnAudit(context, metalake, catalog, schema, table, column);}+ /**+ * Create a new {@link ListColumns} command to list all columns of a table.+ *+ * @param context the command execution context+ * @param metalake the target metalake name+ * @param catalog the target catalog name+ * @param schema the target schema name+ * @param table the target table name+ * @return a new {@link ListColumns} command instance+ */protected ListColumns newListColumns(CommandContext context, String metalake, String catalog, String schema, String table) {return new ListColumns(context, metalake, catalog, schema, table);}+ /**+ * Create a new {@link SetOwner} command to set the owner of an entity.+ *+ * @param context the command execution context+ * @param metalake the target metalake name+ * @param entity the entity identifier (e.g., table, schema)+ * @param entityType the entity type (e.g., TABLE, SCHEMA)+ * @param owner the new owner name+ * @param isGroup true if the owner is a group, false if it is a user+ * @return a new {@link SetOwner} command instance+ */protected SetOwner newSetOwner(CommandContext context,String metalake,@@ -564,21 +1238,60 @@ public class TestableCommandLine {return new SetOwner(context, metalake, entity, entityType, owner, isGroup);}+ /**+ * Create a new {@link OwnerDetails} command to fetch the owner details of an entity.+ *+ * @param context the command execution context+ * @param metalake the target metalake name+ * @param entity the entity identifier+ * @param entityType the type of the entity+ * @return a new {@link OwnerDetails} command instance+ */protected OwnerDetails newOwnerDetails(CommandContext context, String metalake, String entity, String entityType) {return new OwnerDetails(context, metalake, entity, entityType);}+ /**+ * Create a new {@link ListTopics} command to list topics within a schema.+ *+ * @param context the command execution context+ * @param metalake the target metalake name+ * @param catalog the target catalog name+ * @param schema the target schema name+ * @return a new {@link ListTopics} command instance+ */protected ListTopics newListTopics(CommandContext context, String metalake, String catalog, String schema) {return new ListTopics(context, metalake, catalog, schema);}+ /**+ * Create a new {@link TopicDetails} command to fetch details of a specific topic.+ *+ * @param context the command execution context+ * @param metalake the target metalake name+ * @param catalog the target catalog name+ * @param schema the target schema name+ * @param topic the target topic name+ * @return a new {@link TopicDetails} command instance+ */protected TopicDetails newTopicDetails(CommandContext context, String metalake, String catalog, String schema, String topic) {return new TopicDetails(context, metalake, catalog, schema, topic);}+ /**+ * Create a new {@link CreateTopic} command to create a topic with an optional comment.+ *+ * @param context the command execution context+ * @param metalake the target metalake name+ * @param catalog the target catalog name+ * @param schema the target schema name+ * @param topic the topic name+ * @param comment an optional comment for the topic+ * @return a new {@link CreateTopic} command instance+ */protected CreateTopic newCreateTopic(CommandContext context,String metalake,@@ -589,11 +1302,32 @@ public class TestableCommandLine {return new CreateTopic(context, metalake, catalog, schema, topic, comment);}+ /**+ * Create a new {@link DeleteTopic} command to delete a topic.+ *+ * @param context the command execution context+ * @param metalake the target metalake name+ * @param catalog the target catalog name+ * @param schema the target schema name+ * @param topic the topic to delete+ * @return a new {@link DeleteTopic} command instance+ */protected DeleteTopic newDeleteTopic(CommandContext context, String metalake, String catalog, String schema, String topic) {return new DeleteTopic(context, metalake, catalog, schema, topic);}+ /**+ * Create a new {@link UpdateTopicComment} command to update the comment of a topic.+ *+ * @param context the command execution context+ * @param metalake the target metalake name+ * @param catalog the target catalog name+ * @param schema the target schema name+ * @param topic the topic name+ * @param comment the new comment+ * @return a new {@link UpdateTopicComment} command instance+ */protected UpdateTopicComment newUpdateTopicComment(CommandContext context,String metalake,@@ -604,6 +1338,18 @@ public class TestableCommandLine {return new UpdateTopicComment(context, metalake, catalog, schema, topic, comment);}+ /**+ * Create a new {@link SetTopicProperty} command to set a property of a topic.+ *+ * @param context the command execution context+ * @param metalake the target metalake name+ * @param catalog the target catalog name+ * @param schema the target schema name+ * @param topic the target topic name+ * @param property the property key+ * @param value the property value+ * @return a new {@link SetTopicProperty} command instance+ */protected SetTopicProperty newSetTopicProperty(CommandContext context,String metalake,@@ -615,6 +1361,17 @@ public class TestableCommandLine {return new SetTopicProperty(context, metalake, catalog, schema, topic, property, value);}+ /**+ * Create a new {@link RemoveTopicProperty} command to remove a property from a topic.+ *+ * @param context the command execution context+ * @param metalake the target metalake name+ * @param catalog the target catalog name+ * @param schema the target schema name+ * @param topic the target topic name+ * @param property the property key to remove+ * @return a new {@link RemoveTopicProperty} command instance+ */protected RemoveTopicProperty newRemoveTopicProperty(CommandContext context,String metalake,@@ -625,21 +1382,62 @@ public class TestableCommandLine {return new RemoveTopicProperty(context, metalake, catalog, schema, topic, property);}+ /**+ * Create a new {@link ListTopicProperties} command to list all properties of a topic.+ *+ * @param context the command execution context+ * @param metalake the target metalake name+ * @param catalog the target catalog name+ * @param schema the target schema name+ * @param topic the target topic name+ * @return a new {@link ListTopicProperties} command instance+ */protected ListTopicProperties newListTopicProperties(CommandContext context, String metalake, String catalog, String schema, String topic) {return new ListTopicProperties(context, metalake, catalog, schema, topic);}+ /**+ * Create a new {@link FilesetDetails} command to fetch details of a fileset.+ *+ * @param context the command execution context+ * @param metalake the target metalake name+ * @param catalog the target catalog name+ * @param schema the target schema name+ * @param fileset the target fileset name+ * @return a new {@link FilesetDetails} command instance+ */protected FilesetDetails newFilesetDetails(CommandContext context, String metalake, String catalog, String schema, String fileset) {return new FilesetDetails(context, metalake, catalog, schema, fileset);}+ /**+ * Create a new {@link ListFilesets} command to list filesets in a schema.+ *+ * @param context the command execution context+ * @param metalake the target metalake name+ * @param catalog the target catalog name+ * @param schema the target schema name+ * @return a new {@link ListFilesets} command instance+ */protected ListFilesets newListFilesets(CommandContext context, String metalake, String catalog, String schema) {return new ListFilesets(context, metalake, catalog, schema);}+ /**+ * Create a new {@link CreateFileset} command to create a fileset with properties.+ *+ * @param context the command execution context+ * @param metalake the target metalake name+ * @param catalog the target catalog name+ * @param schema the target schema name+ * @param fileset the fileset name+ * @param comment an optional comment+ * @param propertyMap a map of custom properties+ * @return a new {@link CreateFileset} command instance+ */protected CreateFileset newCreateFileset(CommandContext context,String metalake,@@ -651,11 +1449,32 @@ public class TestableCommandLine {return new CreateFileset(context, metalake, catalog, schema, fileset, comment, propertyMap);}+ /**+ * Create a new {@link DeleteFileset} command to delete a fileset.+ *+ * @param context the command execution context+ * @param metalake the target metalake name+ * @param catalog the target catalog name+ * @param schema the target schema name+ * @param fileset the fileset to delete+ * @return a new {@link DeleteFileset} command instance+ */protected DeleteFileset newDeleteFileset(CommandContext context, String metalake, String catalog, String schema, String fileset) {return new DeleteFileset(context, metalake, catalog, schema, fileset);}+ /**+ * Create a new {@link UpdateFilesetComment} command to update the comment of a fileset.+ *+ * @param context the command execution context+ * @param metalake the target metalake name+ * @param catalog the target catalog name+ * @param schema the target schema name+ * @param fileset the fileset name+ * @param comment the new comment+ * @return a new {@link UpdateFilesetComment} command instance+ */protected UpdateFilesetComment newUpdateFilesetComment(CommandContext context,String metalake,@@ -666,6 +1485,17 @@ public class TestableCommandLine {return new UpdateFilesetComment(context, metalake, catalog, schema, fileset, comment);}+ /**+ * Create a new {@link UpdateFilesetName} command to rename a fileset.+ *+ * @param context the command execution context+ * @param metalake the target metalake name+ * @param catalog the target catalog name+ * @param schema the target schema name+ * @param fileset the original fileset name+ * @param rename the new fileset name+ * @return a new {@link UpdateFilesetName} command instance+ */protected UpdateFilesetName newUpdateFilesetName(CommandContext context,String metalake,@@ -676,11 +1506,33 @@ public class TestableCommandLine {return new UpdateFilesetName(context, metalake, catalog, schema, fileset, rename);}+ /**+ * Get a new instance of the command to list properties of a fileset.+ *+ * @param context The command context+ * @param metalake The name of the metalake+ * @param catalog The name of the catalog+ * @param schema The name of the schema+ * @param fileset The name of the fileset+ * @return a new instance of the command to list properties of a fileset.+ */protected ListFilesetProperties newListFilesetProperties(CommandContext context, String metalake, String catalog, String schema, String fileset) {return new ListFilesetProperties(context, metalake, catalog, schema, fileset);}+ /**+ * Get a new instance of the command to set a property of a fileset.+ *+ * @param context The command context+ * @param metalake The name of the metalake+ * @param catalog The name of the catalog+ * @param schema The name of the schema+ * @param fileset The name of the fileset+ * @param property The property key+ * @param value The property value+ * @return a new instance of the command to set a property of a fileset.+ */protected SetFilesetProperty newSetFilesetProperty(CommandContext context,String metalake,@@ -692,6 +1544,17 @@ public class TestableCommandLine {return new SetFilesetProperty(context, metalake, catalog, schema, fileset, property, value);}+ /**+ * Get a new instance of the command to remove a property from a fileset.+ *+ * @param context The command context+ * @param metalake The name of the metalake+ * @param catalog The name of the catalog+ * @param schema The name of the schema+ * @param fileset The name of the fileset+ * @param property The property key to remove+ * @return a new instance of the command to remove a property from a fileset.+ */protected RemoveFilesetProperty newRemoveFilesetProperty(CommandContext context,String metalake,@@ -702,6 +1565,23 @@ public class TestableCommandLine {return new RemoveFilesetProperty(context, metalake, catalog, schema, fileset, property);}+ /**+ * Get a new instance of the command to add a column.+ *+ * @param context The command context.+ * @param metalake The name of the metalake instance.+ * @param catalog The name of the catalog.+ * @param schema The name of the schema.+ * @param table The name of the table.+ * @param column The name of the column.+ * @param datatype The data type of the column.+ * @param comment The comment for the column.+ * @param position The position of the column.+ * @param nullable whether the column is nullable.+ * @param autoIncrement whether the column is auto increment.+ * @param defaultValue The default value for the column.+ * @return a new instance of the command.+ */protected AddColumn newAddColumn(CommandContext context,String metalake,@@ -730,6 +1610,17 @@ public class TestableCommandLine {defaultValue);}+ /**+ * Get a new instance of the command to delete a column.+ *+ * @param context The command context.+ * @param metalake The name of the metalake instance.+ * @param catalog The name of the catalog.+ * @param schema The name of the schema.+ * @param table The name of the table.+ * @param column The name of the column.+ * @return The instance of the command.+ */protected DeleteColumn newDeleteColumn(CommandContext context,String metalake,@@ -740,6 +1631,18 @@ public class TestableCommandLine {return new DeleteColumn(context, metalake, catalog, schema, table, column);}+ /**+ * Get a new instance of the command to update a column comment.+ *+ * @param context The command context.+ * @param metalake The name of the metalake instance.+ * @param catalog The name of the catalog.+ * @param schema The name of the schema.+ * @param table The name of the table.+ * @param column The name of the column.+ * @param comment The new comment for the column.+ * @return The instance of the command.+ */protected UpdateColumnComment newUpdateColumnComment(CommandContext context,String metalake,@@ -751,6 +1654,18 @@ public class TestableCommandLine {return new UpdateColumnComment(context, metalake, catalog, schema, table, column, comment);}+ /**+ * Get a new instance of the command to update a column name.+ *+ * @param context The command context.+ * @param metalake The name of the metalake instance.+ * @param catalog The name of the catalog.+ * @param schema The name of the schema.+ * @param table The name of the table.+ * @param column The name of the column.+ * @param rename The new name for the column.+ * @return The instance of the command.+ */protected UpdateColumnName newUpdateColumnName(CommandContext context,String metalake,@@ -762,6 +1677,18 @@ public class TestableCommandLine {return new UpdateColumnName(context, metalake, catalog, schema, table, column, rename);}+ /**+ * Get a new instance of the command to update a column datatype.+ *+ * @param context The command context.+ * @param metalake The name of the metalake instance.+ * @param catalog The name of the catalog.+ * @param schema The name of the schema.+ * @param table The name of the table.+ * @param column The name of the column.+ * @param datatype The new data type for the column.+ * @return The instance of the command.+ */protected UpdateColumnDatatype newUpdateColumnDatatype(CommandContext context,String metalake,@@ -773,6 +1700,18 @@ public class TestableCommandLine {return new UpdateColumnDatatype(context, metalake, catalog, schema, table, column, datatype);}+ /**+ * Get a new instance of the command to update a column position.+ *+ * @param context The command context.+ * @param metalake The name of the metalake instance.+ * @param catalog The name of the catalog.+ * @param schema The name of the schema.+ * @param table The name of the table.+ * @param column The name of the column.+ * @param position The new position for the column.+ * @return The instance of the command.+ */protected UpdateColumnPosition newUpdateColumnPosition(CommandContext context,String metalake,@@ -784,6 +1723,18 @@ public class TestableCommandLine {return new UpdateColumnPosition(context, metalake, catalog, schema, table, column, position);}+ /**+ * Get a new instance of the command to update a column nullable.+ *+ * @param context The command context.+ * @param metalake The name of the metalake instance.+ * @param catalog The name of the catalog.+ * @param schema The name of the schema.+ * @param table The name of the table.+ * @param column The name of the column.+ * @param nullable whether the column is nullable.+ * @return The instance of the command.+ */protected UpdateColumnNullability newUpdateColumnNullability(CommandContext context,String metalake,@@ -795,6 +1746,18 @@ public class TestableCommandLine {return new UpdateColumnNullability(context, metalake, catalog, schema, table, column, nullable);}+ /**+ * Get a new instance of the command to update a column auto increment.+ *+ * @param context The command context.+ * @param metalake The name of the metalake instance.+ * @param catalog The name of the catalog.+ * @param schema The name of the schema.+ * @param table The name of the table.+ * @param column The name of the column.+ * @param autoIncrement whether the column is auto increment.+ * @return The instance of the command.+ */protected UpdateColumnAutoIncrement newUpdateColumnAutoIncrement(CommandContext context,String metalake,@@ -807,6 +1770,19 @@ public class TestableCommandLine {context, metalake, catalog, schema, table, column, autoIncrement);}+ /**+ * Get a new instance of the command to update a column default value.+ *+ * @param context The command context.+ * @param metalake The name of the metalake instance.+ * @param catalog The name of the catalog.+ * @param schema The name of the schema.+ * @param table The name of the table.+ * @param column The name of the column.+ * @param defaultValue The new default value for the column.+ * @param dataType The data type of the column.+ * @return The instance of the command.+ */protected UpdateColumnDefault newUpdateColumnDefault(CommandContext context,String metalake,@@ -820,6 +1796,18 @@ public class TestableCommandLine {context, metalake, catalog, schema, table, column, defaultValue, dataType);}+ /**+ * Get a new instance of the command to create a new catalog in a metalake instance.+ *+ * @param context The command context.+ * @param metalake The name of the metalake instance.+ * @param catalog The name of the catalog.+ * @param schema The name of the schema.+ * @param table The name of the table.+ * @param columnFile The file containing the column definitions.+ * @param comment The comment for the table.+ * @return The instance of the command.+ */protected CreateTable newCreateTable(CommandContext context,String metalake,@@ -831,45 +1819,130 @@ public class TestableCommandLine {return new CreateTable(context, metalake, catalog, schema, table, columnFile, comment);}+ /**+ * Get a new instance of the command to grant privileges to a role+ *+ * @param context The command context.+ * @param metalake The name of the metalake instance.+ * @param role The name of the role.+ * @param entity The entity to grant privileges on.+ * @param privileges The privileges to grant.+ * @return The instance of the command.+ */protected GrantPrivilegesToRole newGrantPrivilegesToRole(CommandContext context, String metalake, String role, FullName entity, String[] privileges) {return new GrantPrivilegesToRole(context, metalake, role, entity, privileges);}+ /**+ * Get a new instance of the command to grant all privileges to a role on an entity.+ *+ * @param context The command context.+ * @param metalake The name of the metalake instance.+ * @param role The name of the role.+ * @param entity The entity to grant privileges on.+ * @param privileges The privileges to grant.+ * @return The instance of the command.+ */protected RevokePrivilegesFromRole newRevokePrivilegesFromRole(CommandContext context, String metalake, String role, FullName entity, String[] privileges) {return new RevokePrivilegesFromRole(context, metalake, role, entity, privileges);}+ /**+ * Get a new instance of the command to grant all privileges to a role on an entity.+ *+ * @param context The command context.+ * @param metalake The name of the metalake instance.+ * @param role The name of the role.+ * @param entity The entity to grant privileges on.+ * @return The instance of the command.+ */protected RevokeAllPrivileges newRevokeAllPrivileges(CommandContext context, String metalake, String role, FullName entity) {return new RevokeAllPrivileges(context, metalake, role, entity);}+ /**+ * Get a new instance of the command to list the catalogs in a metalake instance.+ *+ * @param context The command context.+ * @param metalake The name of the metalake instance.+ * @return The instance of the command.+ */protected ManageMetalake newManageMetalake(CommandContext context, String metalake) {return new ManageMetalake(context, metalake);}+ /**+ * Get a new instance of the command to list the catalogs in a metalake instance.+ *+ * @param context The command context.+ * @param metalake The name of the metalake instance.+ * @param catalog The name of the catalog.+ * @return The instance of the command.+ */protected ManageCatalog newManageCatalog(CommandContext context, String metalake, String catalog) {return new ManageCatalog(context, metalake, catalog);}+ /**+ * Get a new instance of the command to list the tables in a catalog.+ *+ * @param context The command context.+ * @param metalake The name of the metalake instance.+ * @param catalog The name of the catalog.+ * @param schema The name of the schema.+ * @return The instance of the command.+ */protected ListModel newListModel(CommandContext context, String metalake, String catalog, String schema) {return new ListModel(context, metalake, catalog, schema);}+ /**+ * Get a new instance of the command to list the tables in a catalog.+ *+ * @param context The command context.+ * @param metalake The name of the metalake instance.+ * @param catalog The name of the catalog.+ * @param schema The name of the schema.+ * @param model The name of the model.+ * @return The instance of the command.+ */protected ModelAudit newModelAudit(CommandContext context, String metalake, String catalog, String schema, String model) {return new ModelAudit(context, metalake, catalog, schema, model);}+ /**+ * Get a new instance of the command to list the tables in a catalog.+ *+ * @param context The command context.+ * @param metalake The name of the metalake instance.+ * @param catalog The name of the catalog.+ * @param schema The name of the schema.+ * @param model The name of the model.+ * @return The instance of the command.+ */protected ModelDetails newModelDetails(CommandContext context, String metalake, String catalog, String schema, String model) {return new ModelDetails(context, metalake, catalog, schema, model);}+ /**+ * Get a new instance of the command to delete a model.+ *+ * @param context The command context.+ * @param metalake The name of the metalake instance.+ * @param catalog The name of the catalog.+ * @param schema The name of the schema.+ * @param model The name of the model.+ * @param comment The comment for the model.+ * @param properties The properties for the model.+ * @return The instance of the command.+ */protected RegisterModel newCreateModel(CommandContext context,String metalake,@@ -881,6 +1954,17 @@ public class TestableCommandLine {return new RegisterModel(context, metalake, catalog, schema, model, comment, properties);}+ /**+ * Get a new instance of the command to update a model name.+ *+ * @param context The command context.+ * @param metalake The name of the metalake instance.+ * @param catalog The name of the catalog.+ * @param schema The name of the schema.+ * @param model The name of the model.+ * @param rename The new name for the model.+ * @return The instance of the command.+ */protected UpdateModelName newUpdateModelName(CommandContext context,String metalake,@@ -891,6 +1975,17 @@ public class TestableCommandLine {return new UpdateModelName(context, metalake, catalog, schema, model, rename);}+ /**+ * Get a new instance of the command to update a model comment.+ *+ * @param context The command context.+ * @param metalake The name of the metalake instance.+ * @param catalog The name of the catalog.+ * @param schema The name of the schema.+ * @param model The name of the model.+ * @param comment The new comment for the model.+ * @return The instance of the command.+ */protected UpdateModelComment newUpdateModelComment(CommandContext context,String metalake,@@ -901,6 +1996,19 @@ public class TestableCommandLine {return new UpdateModelComment(context, metalake, catalog, schema, model, comment);}+ /**+ * Get a new instance of the command to add a model version.+ *+ * @param context The command context.+ * @param metalake The name of the metalake instance.+ * @param catalog The name of the catalog.+ * @param schema The name of the schema.+ * @param model The name of the model.+ * @param version The version of the model.+ * @param alias The alias of the model version.+ * @param comment The comment for the model version.+ * @return The instance of the command.+ */protected UpdateModelVersionComment newUpdateModelVersionComment(CommandContext context,String metalake,@@ -914,6 +2022,19 @@ public class TestableCommandLine {context, metalake, catalog, schema, model, version, alias, comment);}+ /**+ * Get a new instance of the command to add a model version.+ *+ * @param context The command context.+ * @param metalake The name of the metalake.+ * @param catalog The name of the catalog.+ * @param schema The name of the schema.+ * @param model The name of the model.+ * @param version The version of the model.+ * @param alias The alias of the model version.+ * @param uri The URI of the model version.+ * @return The instance of the command.+ */protected UpdateModelVersionUri newUpdateModelVersionUri(CommandContext context,String metalake,@@ -927,6 +2048,20 @@ public class TestableCommandLine {context, metalake, catalog, schema, model, version, alias, uri);}+ /**+ * Get a new instance of the command to add a model version alias.+ *+ * @param context The command context.+ * @param metalake The name of the metalake.+ * @param catalog The name of the catalog.+ * @param schema The name of the schema.+ * @param model The name of the model.+ * @param version The version of the model.+ * @param alias The alias of the model version.+ * @param aliasesToAdd The aliases to add.+ * @param aliasesToRemove The aliases to remove.+ * @return The instance of the command.+ */protected UpdateModelVersionAliases newUpdateModelVersionAliases(CommandContext context,String metalake,@@ -941,6 +2076,18 @@ public class TestableCommandLine {context, metalake, catalog, schema, model, version, alias, aliasesToAdd, aliasesToRemove);}+ /**+ * Get a new instance of the command to remove a model property.+ *+ * @param context The command context.+ * @param metalake The name of the metalake.+ * @param catalog The name of the catalog.+ * @param schema The name of the schema.+ * @param model The name of the model.+ * @param property The name of the property to remove.+ * @param value The value of the property to remove.+ * @return The instance of the command.+ */protected SetModelProperty newSetModelProperty(CommandContext context,String metalake,@@ -952,6 +2099,19 @@ public class TestableCommandLine {return new SetModelProperty(context, metalake, catalog, schema, model, property, value);}+ /**+ * Get a new instance of the command to remove a model version property.+ *+ * @param context The command context.+ * @param metalake The name of the metalake instance.+ * @param catalog The name of the catalog.+ * @param schema The name of the schema.+ * @param model The name of the model.+ * @param version The version of the model.+ * @param alias The alias of the model version.+ * @param property The name of the property to remove.+ * @return The instance of the command.+ */protected RemoveModelVersionProperty newRemoveModelVersionProperty(CommandContext context,String metalake,@@ -965,6 +2125,20 @@ public class TestableCommandLine {context, metalake, catalog, schema, model, version, alias, property);}+ /**+ * Get a new instance of the command to remove a model version property.+ *+ * @param context The command context.+ * @param metalake The name of the metalake instance.+ * @param catalog The name of the catalog.+ * @param schema The name of the schema.+ * @param model The name of the model.+ * @param version The version of the model.+ * @param alias The alias of the model version.+ * @param property The name of the property to remove.+ * @param value The value of the property to remove.+ * @return The instance of the command.+ */protected SetModelVersionProperty newSetModelVersionProperty(CommandContext context,String metalake,@@ -979,6 +2153,17 @@ public class TestableCommandLine {context, metalake, catalog, schema, model, version, alias, property, value);}+ /**+ * Get a new instance of the command to remove a model property.+ *+ * @param context The command context.+ * @param metalake The name of the metalake instance.+ * @param catalog The name of the catalog.+ * @param schema The name of the schema.+ * @param model The name of the model.+ * @param property The name of the property to remove.+ * @return The instance of the command.+ */protected RemoveModelProperty newRemoveModelProperty(CommandContext context,String metalake,@@ -989,11 +2174,35 @@ public class TestableCommandLine {return new RemoveModelProperty(context, metalake, catalog, schema, model, property);}+ /**+ * Get a new instance of the command to delete a model.+ *+ * @param context The command context.+ * @param metalake The name of the metalake instance.+ * @param catalog The name of the catalog.+ * @param schema The name of the schema.+ * @param model The name of the model.+ * @return The instance of the command.+ */protected DeleteModel newDeleteModel(CommandContext context, String metalake, String catalog, String schema, String model) {return new DeleteModel(context, metalake, catalog, schema, model);}+ /**+ * Get a new instance of the command to link a model version.+ *+ * @param context The command context.+ * @param metalake The name of the metalake instance.+ * @param catalog The name of the catalog.+ * @param schema The name of the schema.+ * @param model The name of the model.+ * @param uris The map of external resource URIs to aliases.+ * @param alias The alias of the model version to link.+ * @param comment The comment for the linked model version.+ * @param properties The properties for the linked model version.+ * @return The instance of the command.+ */protected LinkModel newLinkModel(CommandContext context,String metalake,@@ -1007,4 +2216,18 @@ public class TestableCommandLine {return new LinkModel(context, metalake, catalog, schema, model, uris, alias, comment, properties);}++ /**+ * Get a new instance of the command to list the tables in a schema.+ *+ * @param context The command context.+ * @param metalake The name of the metalake instance.+ * @param catalog The name of the catalog.+ * @param schema The name of the schema.+ * @return The instance of the command.+ */+ protected ListTables newListTables(+ CommandContext context, String metalake, String catalog, String schema) {+ return new ListTables(context, metalake, catalog, schema);+ }}diff --git a/clients/cli/src/main/java/org/apache/gravitino/cli/TypeConverter.java b/clients/cli/src/main/java/org/apache/gravitino/cli/TypeConverter.javaindex c34560c2a7..f5a75ed9fa 100644--- a/clients/cli/src/main/java/org/apache/gravitino/cli/TypeConverter.java+++ b/clients/cli/src/main/java/org/apache/gravitino/cli/TypeConverter.java@@ -22,6 +22,7 @@ package org.apache.gravitino.cli;import org.apache.gravitino.rel.types.Type;import org.apache.gravitino.rel.types.Types;+/** Utility class for converting type names to Type instances. */public class TypeConverter {/**diff --git a/clients/cli/src/main/java/org/apache/gravitino/cli/commands/AddColumn.java b/clients/cli/src/main/java/org/apache/gravitino/cli/commands/AddColumn.javaindex 6227f695d9..40703fe1c6 100644--- a/clients/cli/src/main/java/org/apache/gravitino/cli/commands/AddColumn.java+++ b/clients/cli/src/main/java/org/apache/gravitino/cli/commands/AddColumn.java@@ -33,18 +33,30 @@ import org.apache.gravitino.exceptions.NoSuchTableException;import org.apache.gravitino.rel.TableChange;import org.apache.gravitino.rel.types.Type;+/** Represents the command for adding a new column to a table. */public class AddColumn extends Command {+ /** The name of the metalake. */protected final String metalake;+ /** The name of the catalog. */protected final String catalog;+ /** The name of the schema. */protected final String schema;+ /** The name of the table. */protected final String table;+ /** The name of the new column. */protected final String column;+ /** The data type of the new column. */protected final String datatype;+ /** The comment for the column (optional). */protected final String comment;+ /** The position of the column (optional). */protected final String position;+ /** True if the column can be null, false if it cannot be (optional). */protected final boolean nullable;+ /** True if the column auto increments (optional). */protected final boolean autoIncrement;+ /** Default value of the column (optional). */protected final String defaultValue;/**diff --git a/clients/cli/src/main/java/org/apache/gravitino/cli/commands/AddRoleToGroup.java b/clients/cli/src/main/java/org/apache/gravitino/cli/commands/AddRoleToGroup.javaindex 7ea3d6b8e4..ac4d5b1406 100644--- a/clients/cli/src/main/java/org/apache/gravitino/cli/commands/AddRoleToGroup.java+++ b/clients/cli/src/main/java/org/apache/gravitino/cli/commands/AddRoleToGroup.java@@ -30,8 +30,11 @@ import org.apache.gravitino.exceptions.NoSuchUserException;/** Adds a role to a group. */public class AddRoleToGroup extends Command {+ /** The name of the metalake. */protected String metalake;+ /** The name of the group. */protected String group;+ /** The name of the role. */protected String role;/**diff --git a/clients/cli/src/main/java/org/apache/gravitino/cli/commands/AddRoleToUser.java b/clients/cli/src/main/java/org/apache/gravitino/cli/commands/AddRoleToUser.javaindex fd76ccfe2f..0dad5b9038 100644--- a/clients/cli/src/main/java/org/apache/gravitino/cli/commands/AddRoleToUser.java+++ b/clients/cli/src/main/java/org/apache/gravitino/cli/commands/AddRoleToUser.java@@ -30,8 +30,11 @@ import org.apache.gravitino.exceptions.NoSuchUserException;/** Adds a role to a user. */public class AddRoleToUser extends Command {+ /** The name of the metalake. */protected String metalake;+ /** The name of the user. */protected String user;+ /** The name of the role. */protected String role;/**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.javadeleted file mode 100644index cd8deb9c13..0000000000--- a/clients/cli/src/main/java/org/apache/gravitino/cli/commands/AllMetalakeDetails.java+++ /dev/null@@ -1,60 +0,0 @@-/*- * Licensed to the Apache Software Foundation (ASF) under one- * or more contributor license agreements. See the NOTICE file- * distributed with this work for additional information- * regarding copyright ownership. The ASF licenses this file- * to you under the Apache License, Version 2.0 (the- * "License"); you may not use this file except in compliance- * with the License. You may obtain a copy of the License at- *- * http://www.apache.org/licenses/LICENSE-2.0- *- * Unless required by applicable law or agreed to in writing,- * software distributed under the License is distributed on an- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY- * KIND, either express or implied. See the License for the- * specific language governing permissions and limitations- * under the License.- */--package org.apache.gravitino.cli.commands;--import com.google.common.base.Joiner;-import java.util.ArrayList;-import java.util.List;-import org.apache.gravitino.Metalake;-import org.apache.gravitino.cli.CommandContext;-import org.apache.gravitino.client.GravitinoAdminClient;--public class AllMetalakeDetails extends Command {-- /**- * Parameters needed to list all metalakes.- *- * @param context The command context.- */- public AllMetalakeDetails(CommandContext context) {- super(context);- }-- /** Displays the name and comment of all metalakes. */- @Override- public void handle() {- Metalake[] metalakes = new Metalake[0];- try {- GravitinoAdminClient client = buildAdminClient();- metalakes = client.listMetalakes();- } catch (Exception exp) {- exitWithError(exp.getMessage());- }-- List<String> metalakeDetails = new ArrayList<>();- for (int i = 0; i < metalakes.length; i++) {- metalakeDetails.add(metalakes[i].name() + "," + metalakes[i].comment());- }-- String all = Joiner.on(System.lineSeparator()).join(metalakeDetails);-- printResults(all);- }-}diff --git a/clients/cli/src/main/java/org/apache/gravitino/cli/commands/AuditCommand.java b/clients/cli/src/main/java/org/apache/gravitino/cli/commands/AuditCommand.javaindex d13d4e0ebb..484de061d7 100644--- a/clients/cli/src/main/java/org/apache/gravitino/cli/commands/AuditCommand.java+++ b/clients/cli/src/main/java/org/apache/gravitino/cli/commands/AuditCommand.java@@ -22,6 +22,7 @@ package org.apache.gravitino.cli.commands;import org.apache.gravitino.Audit;import org.apache.gravitino.cli.CommandContext;+/** Base class for commands that display audit information. */public abstract class AuditCommand extends Command {/** @param context The command context. */diff --git a/clients/cli/src/main/java/org/apache/gravitino/cli/commands/CatalogAudit.java b/clients/cli/src/main/java/org/apache/gravitino/cli/commands/CatalogAudit.javaindex b46dc50ada..208715bbd6 100644--- a/clients/cli/src/main/java/org/apache/gravitino/cli/commands/CatalogAudit.java+++ b/clients/cli/src/main/java/org/apache/gravitino/cli/commands/CatalogAudit.java@@ -26,9 +26,12 @@ import org.apache.gravitino.client.GravitinoClient;import org.apache.gravitino.exceptions.NoSuchCatalogException;import org.apache.gravitino.exceptions.NoSuchMetalakeException;+/** Displays the audit information of a specified catalog. */public class CatalogAudit extends AuditCommand {+ /** The name of the metalake. */protected final String metalake;+ /** The name of the catalog. */protected final String catalog;/**diff --git a/clients/cli/src/main/java/org/apache/gravitino/cli/commands/CatalogDetails.java b/clients/cli/src/main/java/org/apache/gravitino/cli/commands/CatalogDetails.javaindex 81365062c2..9a0ce1a3ad 100644--- a/clients/cli/src/main/java/org/apache/gravitino/cli/commands/CatalogDetails.java+++ b/clients/cli/src/main/java/org/apache/gravitino/cli/commands/CatalogDetails.java@@ -26,9 +26,12 @@ import org.apache.gravitino.client.GravitinoClient;import org.apache.gravitino.exceptions.NoSuchCatalogException;import org.apache.gravitino.exceptions.NoSuchMetalakeException;+/** Represents the detail information of a catalog. */public class CatalogDetails extends Command {+ /** The name of the metalake. */protected final String metalake;+ /** The name of the catalog. */protected final String catalog;/**diff --git a/clients/cli/src/main/java/org/apache/gravitino/cli/commands/ColumnAudit.java b/clients/cli/src/main/java/org/apache/gravitino/cli/commands/ColumnAudit.javaindex 7cee2f9eb6..747effd57e 100644--- a/clients/cli/src/main/java/org/apache/gravitino/cli/commands/ColumnAudit.java+++ b/clients/cli/src/main/java/org/apache/gravitino/cli/commands/ColumnAudit.java@@ -28,12 +28,18 @@ import org.apache.gravitino.exceptions.NoSuchColumnException;import org.apache.gravitino.exceptions.NoSuchMetalakeException;import org.apache.gravitino.exceptions.NoSuchTableException;+/** Represents audit information of a column. */public class ColumnAudit extends AuditCommand {+ /** The name of the metalake. */protected final String metalake;+ /** The name of the catalog. */protected final String catalog;+ /** The name of the schema. */protected final String schema;+ /** The name of the table. */protected final String table;+ /** The name of the column. */protected final String column;/**diff --git a/clients/cli/src/main/java/org/apache/gravitino/cli/commands/Command.java b/clients/cli/src/main/java/org/apache/gravitino/cli/commands/Command.javaindex 57ff339a54..9706e30f1e 100644--- a/clients/cli/src/main/java/org/apache/gravitino/cli/commands/Command.java+++ b/clients/cli/src/main/java/org/apache/gravitino/cli/commands/Command.java@@ -39,14 +39,21 @@ import org.apache.gravitino.client.GravitinoClientBase;import org.apache.gravitino.client.KerberosTokenProvider;import org.apache.gravitino.exceptions.NoSuchMetalakeException;-/* The base for all commands. */+/** The base for all commands. */public abstract class Command {+ /** The table output format */public static final String OUTPUT_FORMAT_TABLE = "table";+ /** The plain output format */public static final String OUTPUT_FORMAT_PLAIN = "plain";+ /** The joiner for comma-separated values */public static final Joiner COMMA_JOINER = Joiner.on(", ").skipNulls();+ /** The authentication mode to be used (e.g. "simple") */protected static String authentication = null;+ /** The username associated with the authentication mode */protected static String userName = null;+ /** The command context */+ protected final CommandContext context;private static final String SIMPLE_AUTH = "simple";private static final String OAUTH_AUTH = "oauth";@@ -56,8 +63,6 @@ public abstract class Command {private final boolean ignoreVersions;private final String outputFormat;- protected final CommandContext context;-/*** Command constructor.*diff --git a/clients/cli/src/main/java/org/apache/gravitino/cli/commands/CreateCatalog.java b/clients/cli/src/main/java/org/apache/gravitino/cli/commands/CreateCatalog.javaindex bd9db50065..bf13b0106d 100644--- a/clients/cli/src/main/java/org/apache/gravitino/cli/commands/CreateCatalog.java+++ b/clients/cli/src/main/java/org/apache/gravitino/cli/commands/CreateCatalog.java@@ -27,11 +27,17 @@ import org.apache.gravitino.client.GravitinoClient;import org.apache.gravitino.exceptions.CatalogAlreadyExistsException;import org.apache.gravitino.exceptions.NoSuchMetalakeException;+/** Represents create a new catalog. */public class CreateCatalog extends Command {+ /** The name of the metalake. */protected final String metalake;+ /** The name of the catalog. */protected final String catalog;+ /** The provider/type of catalog. */protected final String provider;+ /** The catalog's comment. */protected final String comment;+ /** The catalog's properties. */protected final Map<String, String> properties;/**diff --git a/clients/cli/src/main/java/org/apache/gravitino/cli/commands/CreateFileset.java b/clients/cli/src/main/java/org/apache/gravitino/cli/commands/CreateFileset.javaindex 260f45c0d7..91f984083b 100644--- a/clients/cli/src/main/java/org/apache/gravitino/cli/commands/CreateFileset.java+++ b/clients/cli/src/main/java/org/apache/gravitino/cli/commands/CreateFileset.java@@ -32,12 +32,19 @@ import org.apache.gravitino.exceptions.NoSuchSchemaException;import org.apache.gravitino.file.Fileset;import org.apache.gravitino.utils.MapUtils;+/** Represents create a new fileset command. */public class CreateFileset extends Command {+ /** The name of the metalake. */protected final String metalake;+ /** The name of the catalog. */protected final String catalog;+ /** The name of the schema. */protected final String schema;+ /** The name of the fileset. */protected final String fileset;+ /** The fileset's comment. */protected final String comment;+ /** The catalog's properties. */protected final Map<String, String> properties;/**diff --git a/clients/cli/src/main/java/org/apache/gravitino/cli/commands/CreateGroup.java b/clients/cli/src/main/java/org/apache/gravitino/cli/commands/CreateGroup.javaindex 9cdefe3a7a..9a2014279d 100644--- a/clients/cli/src/main/java/org/apache/gravitino/cli/commands/CreateGroup.java+++ b/clients/cli/src/main/java/org/apache/gravitino/cli/commands/CreateGroup.java@@ -25,8 +25,11 @@ import org.apache.gravitino.client.GravitinoClient;import org.apache.gravitino.exceptions.GroupAlreadyExistsException;import org.apache.gravitino.exceptions.NoSuchMetalakeException;+/** Represents create a new group of a metalake */public class CreateGroup extends Command {+ /** The name of the metalake. */protected final String metalake;+ /** The name of the group. */protected final String group;/**diff --git a/clients/cli/src/main/java/org/apache/gravitino/cli/commands/CreateMetalake.java b/clients/cli/src/main/java/org/apache/gravitino/cli/commands/CreateMetalake.javaindex cdb9472f20..121556a257 100644--- a/clients/cli/src/main/java/org/apache/gravitino/cli/commands/CreateMetalake.java+++ b/clients/cli/src/main/java/org/apache/gravitino/cli/commands/CreateMetalake.java@@ -24,8 +24,11 @@ import org.apache.gravitino.cli.ErrorMessages;import org.apache.gravitino.client.GravitinoAdminClient;import org.apache.gravitino.exceptions.MetalakeAlreadyExistsException;+/** Represents create a new metalake */public class CreateMetalake extends Command {+ /** The name of the metalake. */protected final String metalake;+ /** The metalake's comment. */protected final String comment;/**diff --git a/clients/cli/src/main/java/org/apache/gravitino/cli/commands/CreateRole.java b/clients/cli/src/main/java/org/apache/gravitino/cli/commands/CreateRole.javaindex aeecaaf0a3..103e6213b3 100644--- a/clients/cli/src/main/java/org/apache/gravitino/cli/commands/CreateRole.java+++ b/clients/cli/src/main/java/org/apache/gravitino/cli/commands/CreateRole.java@@ -27,8 +27,11 @@ import org.apache.gravitino.client.GravitinoClient;import org.apache.gravitino.exceptions.NoSuchMetalakeException;import org.apache.gravitino.exceptions.RoleAlreadyExistsException;+/** Represent create a new role of a metalake */public class CreateRole extends Command {+ /** The name of the metalake. */protected String metalake;+ /** The array of roles. */protected String[] roles;/**diff --git a/clients/cli/src/main/java/org/apache/gravitino/cli/commands/CreateSchema.java b/clients/cli/src/main/java/org/apache/gravitino/cli/commands/CreateSchema.javaindex 532130403e..15bf9e7fe6 100644--- a/clients/cli/src/main/java/org/apache/gravitino/cli/commands/CreateSchema.java+++ b/clients/cli/src/main/java/org/apache/gravitino/cli/commands/CreateSchema.java@@ -26,10 +26,15 @@ import org.apache.gravitino.exceptions.NoSuchCatalogException;import org.apache.gravitino.exceptions.NoSuchMetalakeException;import org.apache.gravitino.exceptions.SchemaAlreadyExistsException;+/** Represents create a schema */public class CreateSchema extends Command {+ /** The name of the metalake. */protected final String metalake;+ /** The name of the catalog. */protected final String catalog;+ /** The name of the schema. */protected final String schema;+ /** The schema's comment. */protected final String comment;/**diff --git a/clients/cli/src/main/java/org/apache/gravitino/cli/commands/CreateTable.java b/clients/cli/src/main/java/org/apache/gravitino/cli/commands/CreateTable.javaindex 9c9ce76c9f..e30bdcb1da 100644--- a/clients/cli/src/main/java/org/apache/gravitino/cli/commands/CreateTable.java+++ b/clients/cli/src/main/java/org/apache/gravitino/cli/commands/CreateTable.java@@ -32,12 +32,20 @@ import org.apache.gravitino.exceptions.NoSuchSchemaException;import org.apache.gravitino.exceptions.TableAlreadyExistsException;import org.apache.gravitino.rel.Column;+/** Represents the command for creating a new table. */public class CreateTable extends Command {++ /** The name of the metalake. */protected final String metalake;+ /** The name of the catalog. */protected final String catalog;+ /** The name of the schema. */protected final String schema;+ /** The name of the table. */protected final String table;+ /** The path of the file containing the CSV column info. */protected final String columnFile;+ /** The table's comment. */protected final String comment;/**diff --git a/clients/cli/src/main/java/org/apache/gravitino/cli/commands/CreateTag.java b/clients/cli/src/main/java/org/apache/gravitino/cli/commands/CreateTag.javaindex 46bd517f34..067efd1fd5 100644--- a/clients/cli/src/main/java/org/apache/gravitino/cli/commands/CreateTag.java+++ b/clients/cli/src/main/java/org/apache/gravitino/cli/commands/CreateTag.java@@ -28,9 +28,13 @@ import org.apache.gravitino.client.GravitinoClient;import org.apache.gravitino.exceptions.NoSuchMetalakeException;import org.apache.gravitino.exceptions.TagAlreadyExistsException;+/** Command to create tags. */public class CreateTag extends Command {+ /** The name of the metalake. */protected final String metalake;+ /** The names of the tags. */protected final String[] tags;+ /** The comment of the tag. */protected final String comment;/**diff --git a/clients/cli/src/main/java/org/apache/gravitino/cli/commands/CreateTopic.java b/clients/cli/src/main/java/org/apache/gravitino/cli/commands/CreateTopic.javaindex c1fd5c4118..f2932dd98a 100644--- a/clients/cli/src/main/java/org/apache/gravitino/cli/commands/CreateTopic.java+++ b/clients/cli/src/main/java/org/apache/gravitino/cli/commands/CreateTopic.java@@ -30,10 +30,15 @@ import org.apache.gravitino.exceptions.TopicAlreadyExistsException;/** Add a topic. */public class CreateTopic extends Command {+ /** The name of the metalake. */protected final String metalake;+ /** The name of the catalog. */protected final String catalog;+ /** The name of the schema. */protected final String schema;+ /** The name of the topic. */protected final String topic;+ /** The comment for the topic. */protected final String comment;/**diff --git a/clients/cli/src/main/java/org/apache/gravitino/cli/commands/CreateUser.java b/clients/cli/src/main/java/org/apache/gravitino/cli/commands/CreateUser.javaindex 233f3eedc5..a02ce172a1 100644--- a/clients/cli/src/main/java/org/apache/gravitino/cli/commands/CreateUser.java+++ b/clients/cli/src/main/java/org/apache/gravitino/cli/commands/CreateUser.java@@ -25,8 +25,11 @@ import org.apache.gravitino.client.GravitinoClient;import org.apache.gravitino.exceptions.NoSuchMetalakeException;import org.apache.gravitino.exceptions.UserAlreadyExistsException;+/** Represents create a new user */public class CreateUser extends Command {+ /** The name of the metalake. */protected final String metalake;+ /** The name of the user. */protected final String user;/**diff --git a/clients/cli/src/main/java/org/apache/gravitino/cli/commands/DeleteCatalog.java b/clients/cli/src/main/java/org/apache/gravitino/cli/commands/DeleteCatalog.javaindex 60d49772ca..b59159ff5e 100644--- a/clients/cli/src/main/java/org/apache/gravitino/cli/commands/DeleteCatalog.java+++ b/clients/cli/src/main/java/org/apache/gravitino/cli/commands/DeleteCatalog.java@@ -27,10 +27,14 @@ import org.apache.gravitino.exceptions.CatalogInUseException;import org.apache.gravitino.exceptions.NoSuchCatalogException;import org.apache.gravitino.exceptions.NoSuchMetalakeException;+/** Represents delete a catalog */public class DeleteCatalog extends Command {+ /** The name of the metalake. */protected final String metalake;+ /** The name of the catalog. */protected final String catalog;+ /** The force flag. */protected final boolean force;/**diff --git a/clients/cli/src/main/java/org/apache/gravitino/cli/commands/DeleteColumn.java b/clients/cli/src/main/java/org/apache/gravitino/cli/commands/DeleteColumn.javaindex 34ed73b2ee..1f0bec11f1 100644--- a/clients/cli/src/main/java/org/apache/gravitino/cli/commands/DeleteColumn.java+++ b/clients/cli/src/main/java/org/apache/gravitino/cli/commands/DeleteColumn.java@@ -30,12 +30,17 @@ import org.apache.gravitino.exceptions.NoSuchSchemaException;import org.apache.gravitino.exceptions.NoSuchTableException;import org.apache.gravitino.rel.TableChange;+/** Represents delete a column of a table */public class DeleteColumn extends Command {-+ /** The name of the command. */protected final String metalake;+ /** The name of the catalog. */protected final String catalog;+ /** The name of the schema. */protected final String schema;+ /** The name of the table. */protected final String table;+ /** The name of the column. */protected final String column;/**diff --git a/clients/cli/src/main/java/org/apache/gravitino/cli/commands/DeleteFileset.java b/clients/cli/src/main/java/org/apache/gravitino/cli/commands/DeleteFileset.javaindex 8384e1c4bd..e67b06da40 100644--- a/clients/cli/src/main/java/org/apache/gravitino/cli/commands/DeleteFileset.java+++ b/clients/cli/src/main/java/org/apache/gravitino/cli/commands/DeleteFileset.java@@ -29,12 +29,18 @@ import org.apache.gravitino.exceptions.NoSuchFilesetException;import org.apache.gravitino.exceptions.NoSuchMetalakeException;import org.apache.gravitino.exceptions.NoSuchSchemaException;+/** Represents delete a fileset */public class DeleteFileset extends Command {+ /** The name of the metalake. */protected final String metalake;+ /** The name of the catalog. */protected final String catalog;+ /** The name of the schema. */protected final String schema;+ /** The name of the fileset. */protected final String fileset;+ /** Whether to force the deletion. */protected final boolean force;/**diff --git a/clients/cli/src/main/java/org/apache/gravitino/cli/commands/DeleteGroup.java b/clients/cli/src/main/java/org/apache/gravitino/cli/commands/DeleteGroup.javaindex 12a9304eae..1d6fd1e504 100644--- a/clients/cli/src/main/java/org/apache/gravitino/cli/commands/DeleteGroup.java+++ b/clients/cli/src/main/java/org/apache/gravitino/cli/commands/DeleteGroup.java@@ -26,10 +26,14 @@ import org.apache.gravitino.client.GravitinoClient;import org.apache.gravitino.exceptions.NoSuchGroupException;import org.apache.gravitino.exceptions.NoSuchMetalakeException;+/** Represents delete a group */public class DeleteGroup extends Command {+ /** The name of the metalake. */protected final String metalake;+ /** The name of the group. */protected final String group;+ /** The force flag. */protected final boolean force;/**diff --git a/clients/cli/src/main/java/org/apache/gravitino/cli/commands/DeleteMetalake.java b/clients/cli/src/main/java/org/apache/gravitino/cli/commands/DeleteMetalake.javaindex 4f72058cd1..827272e15b 100644--- a/clients/cli/src/main/java/org/apache/gravitino/cli/commands/DeleteMetalake.java+++ b/clients/cli/src/main/java/org/apache/gravitino/cli/commands/DeleteMetalake.java@@ -26,8 +26,11 @@ import org.apache.gravitino.client.GravitinoAdminClient;import org.apache.gravitino.exceptions.MetalakeInUseException;import org.apache.gravitino.exceptions.NoSuchMetalakeException;+/** Represents delete a metalake */public class DeleteMetalake extends Command {+ /** The name of the metalake to delete. */protected final String metalake;+ /** Whether to force the deletion. */protected final boolean force;/**diff --git a/clients/cli/src/main/java/org/apache/gravitino/cli/commands/DeleteModel.java b/clients/cli/src/main/java/org/apache/gravitino/cli/commands/DeleteModel.javaindex 8dc283ee4d..d36e28bf7c 100644--- a/clients/cli/src/main/java/org/apache/gravitino/cli/commands/DeleteModel.java+++ b/clients/cli/src/main/java/org/apache/gravitino/cli/commands/DeleteModel.java@@ -32,10 +32,15 @@ import org.apache.gravitino.exceptions.NoSuchSchemaException;/** Deletes an existing model. */public class DeleteModel extends Command {+ /** The name of the metalake. */protected final String metalake;+ /** The name of the catalog. */protected final String catalog;+ /** The name of the schema. */protected final String schema;+ /** The name of the model. */protected final String model;+ /** Whether to force the deletion. */protected final boolean force;/**diff --git a/clients/cli/src/main/java/org/apache/gravitino/cli/commands/DeleteRole.java b/clients/cli/src/main/java/org/apache/gravitino/cli/commands/DeleteRole.javaindex f596ed0963..5a4a3b6d82 100644--- a/clients/cli/src/main/java/org/apache/gravitino/cli/commands/DeleteRole.java+++ b/clients/cli/src/main/java/org/apache/gravitino/cli/commands/DeleteRole.java@@ -29,10 +29,15 @@ import org.apache.gravitino.client.GravitinoClient;import org.apache.gravitino.exceptions.NoSuchMetalakeException;import org.apache.gravitino.exceptions.NoSuchRoleException;+/** Represents delete a role */public class DeleteRole extends Command {+ /** The joiner for the comma separated roles. */public static final Joiner COMMA_JOINER = Joiner.on(", ").skipNulls();+ /** The name of the metalake. */protected String metalake;+ /** The array of the role. */protected String[] roles;+ /** The flag to force the deletion. */protected boolean force;/**diff --git a/clients/cli/src/main/java/org/apache/gravitino/cli/commands/DeleteSchema.java b/clients/cli/src/main/java/org/apache/gravitino/cli/commands/DeleteSchema.javaindex 1454419676..7cf2d03f72 100644--- a/clients/cli/src/main/java/org/apache/gravitino/cli/commands/DeleteSchema.java+++ b/clients/cli/src/main/java/org/apache/gravitino/cli/commands/DeleteSchema.java@@ -27,11 +27,16 @@ import org.apache.gravitino.exceptions.NoSuchCatalogException;import org.apache.gravitino.exceptions.NoSuchMetalakeException;import org.apache.gravitino.exceptions.NoSuchSchemaException;+/** Represents delete a schema. */public class DeleteSchema extends Command {+ /** The name of the metalake. */protected final String metalake;+ /** The name of the catalog. */protected final String catalog;+ /** The name of the schema. */protected final String schema;+ /** Whether to force the deletion. */protected final boolean force;/**diff --git a/clients/cli/src/main/java/org/apache/gravitino/cli/commands/DeleteTable.java b/clients/cli/src/main/java/org/apache/gravitino/cli/commands/DeleteTable.javaindex 594c49ba5b..3022be6121 100644--- a/clients/cli/src/main/java/org/apache/gravitino/cli/commands/DeleteTable.java+++ b/clients/cli/src/main/java/org/apache/gravitino/cli/commands/DeleteTable.java@@ -29,12 +29,18 @@ import org.apache.gravitino.exceptions.NoSuchMetalakeException;import org.apache.gravitino.exceptions.NoSuchSchemaException;import org.apache.gravitino.exceptions.NoSuchTableException;+/** Represents delete a table */public class DeleteTable extends Command {+ /** The name of the metalake. */protected final String metalake;+ /** The name of the catalog. */protected final String catalog;+ /** The name of the schema. */protected final String schema;+ /** The name of the table. */protected final String table;+ /** Whether to force the deletion. */protected final boolean force;/**diff --git a/clients/cli/src/main/java/org/apache/gravitino/cli/commands/DeleteTag.java b/clients/cli/src/main/java/org/apache/gravitino/cli/commands/DeleteTag.javaindex f0bdf2f3c5..96e811a492 100644--- a/clients/cli/src/main/java/org/apache/gravitino/cli/commands/DeleteTag.java+++ b/clients/cli/src/main/java/org/apache/gravitino/cli/commands/DeleteTag.java@@ -29,10 +29,14 @@ import org.apache.gravitino.client.GravitinoClient;import org.apache.gravitino.exceptions.NoSuchMetalakeException;import org.apache.gravitino.exceptions.NoSuchTagException;+/** Represents delete a tag */public class DeleteTag extends Command {+ /** The name of the metalake. */protected final String metalake;+ /** The array of the tags. */protected final String[] tags;+ /** The force flag. */protected final boolean force;/**diff --git a/clients/cli/src/main/java/org/apache/gravitino/cli/commands/DeleteTopic.java b/clients/cli/src/main/java/org/apache/gravitino/cli/commands/DeleteTopic.javaindex 462c38a005..b7afac5d23 100644--- a/clients/cli/src/main/java/org/apache/gravitino/cli/commands/DeleteTopic.java+++ b/clients/cli/src/main/java/org/apache/gravitino/cli/commands/DeleteTopic.java@@ -31,10 +31,15 @@ import org.apache.gravitino.exceptions.NoSuchTopicException;/** Delete a topic. */public class DeleteTopic extends Command {+ /** The name of the metalake. */protected final String metalake;+ /** The name of the catalog. */protected final String catalog;+ /** The name of the schema. */protected final String schema;+ /** The name of the topic. */protected final String topic;+ /** Whether to force the deletion. */protected final boolean force;/**diff --git a/clients/cli/src/main/java/org/apache/gravitino/cli/commands/DeleteUser.java b/clients/cli/src/main/java/org/apache/gravitino/cli/commands/DeleteUser.javaindex 3e2000199e..2a6891b2b0 100644--- a/clients/cli/src/main/java/org/apache/gravitino/cli/commands/DeleteUser.java+++ b/clients/cli/src/main/java/org/apache/gravitino/cli/commands/DeleteUser.java@@ -27,10 +27,14 @@ import org.apache.gravitino.client.GravitinoClient;import org.apache.gravitino.exceptions.NoSuchMetalakeException;import org.apache.gravitino.exceptions.NoSuchUserException;+/** Delete delete a user of a metalake. */public class DeleteUser extends Command {+ /** The name of the metalake. */protected final String metalake;+ /** The name of the user. */protected final String user;+ /** Whether to force the deletion. */protected final boolean force;/**diff --git a/clients/cli/src/main/java/org/apache/gravitino/cli/commands/FilesetDetails.java b/clients/cli/src/main/java/org/apache/gravitino/cli/commands/FilesetDetails.javaindex e99d37df78..cec9b84879 100644--- a/clients/cli/src/main/java/org/apache/gravitino/cli/commands/FilesetDetails.java+++ b/clients/cli/src/main/java/org/apache/gravitino/cli/commands/FilesetDetails.java@@ -32,9 +32,13 @@ import org.apache.gravitino.file.Fileset;/** Displays the details of fileset. */public class FilesetDetails extends Command {+ /** The name of the metalake. */protected final String metalake;+ /** The name of the catalog. */protected final String catalog;+ /** The name of the schema. */protected final String schema;+ /** The name of the fileset. */protected final String fileset;/**diff --git a/clients/cli/src/main/java/org/apache/gravitino/cli/commands/GrantPrivilegesToRole.java b/clients/cli/src/main/java/org/apache/gravitino/cli/commands/GrantPrivilegesToRole.javaindex 4bdcc618b4..c59ceb71a7 100644--- a/clients/cli/src/main/java/org/apache/gravitino/cli/commands/GrantPrivilegesToRole.java+++ b/clients/cli/src/main/java/org/apache/gravitino/cli/commands/GrantPrivilegesToRole.java@@ -36,9 +36,13 @@ import org.apache.gravitino.exceptions.NoSuchRoleException;/** Grants one or more privileges. */public class GrantPrivilegesToRole extends MetadataCommand {+ /** The name of the metalake. */protected final String metalake;+ /** The name of the role. */protected final String role;+ /** The full name of the entity. */protected final FullName entity;+ /** The list of privileges. */protected final String[] privileges;/**diff --git a/clients/cli/src/main/java/org/apache/gravitino/cli/commands/GroupAudit.java b/clients/cli/src/main/java/org/apache/gravitino/cli/commands/GroupAudit.javaindex 8e52f09bb5..d24552e9d1 100644--- a/clients/cli/src/main/java/org/apache/gravitino/cli/commands/GroupAudit.java+++ b/clients/cli/src/main/java/org/apache/gravitino/cli/commands/GroupAudit.java@@ -26,9 +26,12 @@ import org.apache.gravitino.client.GravitinoClient;import org.apache.gravitino.exceptions.NoSuchGroupException;import org.apache.gravitino.exceptions.NoSuchMetalakeException;+/** Represents the audit command for groups. */public class GroupAudit extends AuditCommand {+ /** The name of the metalake. */protected final String metalake;+ /** The name of the group. */protected final String group;/**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.javaindex c2dd88ff35..8c1268c409 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@@ -27,9 +27,12 @@ import org.apache.gravitino.client.GravitinoClient;import org.apache.gravitino.exceptions.NoSuchGroupException;import org.apache.gravitino.exceptions.NoSuchMetalakeException;+/** Represents the detail information of a group. */public class GroupDetails extends Command {+ /** The name of the metalake. */protected final String metalake;+ /** The name of the group. */protected final String group;/**diff --git a/clients/cli/src/main/java/org/apache/gravitino/cli/commands/LinkModel.java b/clients/cli/src/main/java/org/apache/gravitino/cli/commands/LinkModel.javaindex 8664dacd2a..5e6f317edf 100644--- a/clients/cli/src/main/java/org/apache/gravitino/cli/commands/LinkModel.java+++ b/clients/cli/src/main/java/org/apache/gravitino/cli/commands/LinkModel.java@@ -32,14 +32,23 @@ import org.apache.gravitino.exceptions.NoSuchModelException;import org.apache.gravitino.exceptions.NoSuchSchemaException;import org.apache.gravitino.model.ModelCatalog;+/** Represents link a model */public class LinkModel extends Command {+ /** The name of the metalake. */protected final String metalake;+ /** The name of the catalog. */protected final String catalog;+ /** The name of schema. */protected final String schema;+ /** The name of model. */protected final String model;+ /** The URIs of the model version artifact. */protected final Map<String, String> uris;+ /** The aliases of the model version. */protected final String[] alias;+ /** The comment of the model version. */protected final String comment;+ /** The properties of the model version. */protected final Map<String, String> properties;/**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.javaindex a5fcd2a402..cdf5476ce6 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@@ -25,9 +25,10 @@ import org.apache.gravitino.client.GravitinoClient;import org.apache.gravitino.exceptions.NoSuchMetalakeException;import org.apache.gravitino.tag.Tag;-/* Lists all tags in a metalake. */+/** Lists all tags in a metalake. */public class ListAllTags extends Command {+ /** The name of the metalake. */protected final String metalake;/**diff --git a/clients/cli/src/main/java/org/apache/gravitino/cli/commands/ListCatalogProperties.java b/clients/cli/src/main/java/org/apache/gravitino/cli/commands/ListCatalogProperties.javaindex 54312b8e43..ba1c6f0ca0 100644--- a/clients/cli/src/main/java/org/apache/gravitino/cli/commands/ListCatalogProperties.java+++ b/clients/cli/src/main/java/org/apache/gravitino/cli/commands/ListCatalogProperties.java@@ -30,7 +30,9 @@ import org.apache.gravitino.exceptions.NoSuchMetalakeException;/** List the properties of a catalog. */public class ListCatalogProperties extends ListProperties {+ /** The name of the metalake. */protected final String metalake;+ /** The name of the catalog. */protected final String catalog;/**diff --git a/clients/cli/src/main/java/org/apache/gravitino/cli/commands/ListCatalogs.java b/clients/cli/src/main/java/org/apache/gravitino/cli/commands/ListCatalogs.javaindex 6dc8b4cea3..ba7f43f2b9 100644--- a/clients/cli/src/main/java/org/apache/gravitino/cli/commands/ListCatalogs.java+++ b/clients/cli/src/main/java/org/apache/gravitino/cli/commands/ListCatalogs.java@@ -25,9 +25,9 @@ import org.apache.gravitino.cli.ErrorMessages;import org.apache.gravitino.client.GravitinoClient;import org.apache.gravitino.exceptions.NoSuchMetalakeException;-/* Lists all catalogs in a metalake. */+/** Lists all catalogs in a metalake. */public class ListCatalogs extends Command {-+ /** The name of the metalake. */protected final String metalake;/**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.javaindex 1fc642a555..d7eb899106 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@@ -29,7 +29,9 @@ import org.apache.gravitino.rel.Column;/** Displays the details of a table's columns. */public class ListColumns extends TableCommand {+ /** The name of the schema. */protected final String schema;+ /** The name of the table. */protected final String table;/**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.javaindex e0ebf4b58f..d565a605ed 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@@ -35,10 +35,12 @@ import org.apache.gravitino.messaging.Topic;import org.apache.gravitino.model.Model;import org.apache.gravitino.rel.Table;-/* Lists all tags in a metalake. */+/** Lists all tags in a metalake. */public class ListEntityTags extends Command {+ /** The name of the metalake. */protected String metalake;+ /** The name of the entity. */protected FullName name;/**diff --git a/clients/cli/src/main/java/org/apache/gravitino/cli/commands/ListFilesetProperties.java b/clients/cli/src/main/java/org/apache/gravitino/cli/commands/ListFilesetProperties.javaindex bdaeaccd1e..a7e97fa50f 100644--- a/clients/cli/src/main/java/org/apache/gravitino/cli/commands/ListFilesetProperties.java+++ b/clients/cli/src/main/java/org/apache/gravitino/cli/commands/ListFilesetProperties.java@@ -32,9 +32,13 @@ import org.apache.gravitino.file.Fileset;/** List the properties of a fileset. */public class ListFilesetProperties extends ListProperties {+ /** The name of the metalake. */protected final String metalake;+ /** The name of the catalog. */protected final String catalog;+ /** The name of the schema. */protected final String schema;+ /** The name of the fileset. */protected final String fileset;/**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.javaindex c7ec6f5f97..abfd9dfb5a 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@@ -34,8 +34,11 @@ import org.apache.gravitino.file.Fileset;/** List all fileset names in a schema. */public class ListFilesets extends Command {+ /** The name of the metalake. */protected final String metalake;+ /** The name of the catalog. */protected final String catalog;+ /** The name of the schema. */protected final String schema;/**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.javaindex 67d7c268d5..8950bde792 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@@ -28,9 +28,10 @@ import org.apache.gravitino.cli.ErrorMessages;import org.apache.gravitino.client.GravitinoClient;import org.apache.gravitino.exceptions.NoSuchMetalakeException;-/* Lists all groups in a metalake. */+/** Lists all groups in a metalake. */public class ListGroups extends Command {+ /** The name of the metalake. */protected final String metalake;/**diff --git a/clients/cli/src/main/java/org/apache/gravitino/cli/commands/ListIndexes.java b/clients/cli/src/main/java/org/apache/gravitino/cli/commands/ListIndexes.javaindex 9996a7d475..b03692e92b 100644--- a/clients/cli/src/main/java/org/apache/gravitino/cli/commands/ListIndexes.java+++ b/clients/cli/src/main/java/org/apache/gravitino/cli/commands/ListIndexes.java@@ -27,7 +27,9 @@ import org.apache.gravitino.rel.indexes.Index;/** Displays the index of a table. */public class ListIndexes extends TableCommand {+ /** The name of the schema. */protected final String schema;+ /** The name of the table. */protected final String table;/**diff --git a/clients/cli/src/main/java/org/apache/gravitino/cli/commands/ListMetalakeProperties.java b/clients/cli/src/main/java/org/apache/gravitino/cli/commands/ListMetalakeProperties.javaindex 2e85058d12..ccfa0a890c 100644--- a/clients/cli/src/main/java/org/apache/gravitino/cli/commands/ListMetalakeProperties.java+++ b/clients/cli/src/main/java/org/apache/gravitino/cli/commands/ListMetalakeProperties.java@@ -29,6 +29,7 @@ import org.apache.gravitino.exceptions.NoSuchMetalakeException;/** List the properties of a metalake. */public class ListMetalakeProperties extends ListProperties {+ /** The name of the metalake. */protected final String metalake;/**diff --git a/clients/cli/src/main/java/org/apache/gravitino/cli/commands/ListModel.java b/clients/cli/src/main/java/org/apache/gravitino/cli/commands/ListModel.javaindex 00d74499a0..aa90ef6c02 100644--- a/clients/cli/src/main/java/org/apache/gravitino/cli/commands/ListModel.java+++ b/clients/cli/src/main/java/org/apache/gravitino/cli/commands/ListModel.java@@ -32,8 +32,11 @@ import org.apache.gravitino.model.Model;/** List the names of all models in a schema. */public class ListModel extends Command {+ /** The name of the metalake. */protected final String metalake;+ /** The name of the catalog. */protected final String catalog;+ /** The name of the schema. */protected final String schema;/**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.javaindex ee6e79beec..03580448e7 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@@ -30,9 +30,10 @@ import org.apache.gravitino.cli.ErrorMessages;import org.apache.gravitino.client.GravitinoClient;import org.apache.gravitino.exceptions.NoSuchMetalakeException;-/* Lists all roles in a metalake. */+/** Lists all roles in a metalake. */public class ListRoles extends Command {+ /** The name of the metalake. */protected String metalake;/**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.javaindex 05bfb49276..c76b1ed6d7 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@@ -30,7 +30,9 @@ import org.apache.gravitino.exceptions.NoSuchMetalakeException;/** List all schema names in a schema. */public class ListSchema extends Command {+ /** The name of the metalake. */protected final String metalake;+ /** The name of the catalog. */protected final String catalog;/**diff --git a/clients/cli/src/main/java/org/apache/gravitino/cli/commands/ListSchemaProperties.java b/clients/cli/src/main/java/org/apache/gravitino/cli/commands/ListSchemaProperties.javaindex ff28d4970c..6a627c7a23 100644--- a/clients/cli/src/main/java/org/apache/gravitino/cli/commands/ListSchemaProperties.java+++ b/clients/cli/src/main/java/org/apache/gravitino/cli/commands/ListSchemaProperties.java@@ -31,8 +31,11 @@ import org.apache.gravitino.exceptions.NoSuchSchemaException;/** List the properties of a schema. */public class ListSchemaProperties extends ListProperties {+ /** The name of the metalake. */protected final String metalake;+ /** The name of the catalog. */protected final String catalog;+ /** The name of the schema. */protected final String schema;/**diff --git a/clients/cli/src/main/java/org/apache/gravitino/cli/commands/ListTableProperties.java b/clients/cli/src/main/java/org/apache/gravitino/cli/commands/ListTableProperties.javaindex 1b9f6fbbbb..d9b5347b0a 100644--- a/clients/cli/src/main/java/org/apache/gravitino/cli/commands/ListTableProperties.java+++ b/clients/cli/src/main/java/org/apache/gravitino/cli/commands/ListTableProperties.java@@ -33,9 +33,13 @@ import org.apache.gravitino.rel.Table;/** List the properties of a table. */public class ListTableProperties extends ListProperties {+ /** The name of the metalake. */protected final String metalake;+ /** The name of the catalog. */protected final String catalog;+ /** The name of the schema. */protected final String schema;+ /** The name of the table. */protected final String table;/**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.javaindex 463ff732b0..5c09a447a6 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@@ -30,6 +30,7 @@ import org.apache.gravitino.rel.TableCatalog;/** List the names of all tables in a schema. */public class ListTables extends TableCommand {+ /** The name of the schema. */protected final String schema;/**diff --git a/clients/cli/src/main/java/org/apache/gravitino/cli/commands/ListTagProperties.java b/clients/cli/src/main/java/org/apache/gravitino/cli/commands/ListTagProperties.javaindex 6e2b5f73ed..9acb7a987e 100644--- a/clients/cli/src/main/java/org/apache/gravitino/cli/commands/ListTagProperties.java+++ b/clients/cli/src/main/java/org/apache/gravitino/cli/commands/ListTagProperties.java@@ -31,7 +31,9 @@ import org.apache.gravitino.tag.Tag;/** List the properties of a tag. */public class ListTagProperties extends ListProperties {+ /** The name of the metalake. */protected final String metalake;+ /** The name of the tag. */protected final String tag;/**diff --git a/clients/cli/src/main/java/org/apache/gravitino/cli/commands/ListTopicProperties.java b/clients/cli/src/main/java/org/apache/gravitino/cli/commands/ListTopicProperties.javaindex 038c29b3cb..486124bb83 100644--- a/clients/cli/src/main/java/org/apache/gravitino/cli/commands/ListTopicProperties.java+++ b/clients/cli/src/main/java/org/apache/gravitino/cli/commands/ListTopicProperties.java@@ -33,9 +33,13 @@ import org.apache.gravitino.messaging.Topic;/** List the properties of a topic. */public class ListTopicProperties extends ListProperties {+ /** The name of the metalake. */protected final String metalake;+ /** The name of the catalog. */protected final String catalog;+ /** The name of the schema. */protected final String schema;+ /** The name of the topic. */protected final String topic;/**diff --git a/clients/cli/src/main/java/org/apache/gravitino/cli/commands/ListTopics.java b/clients/cli/src/main/java/org/apache/gravitino/cli/commands/ListTopics.javaindex f9c52b16a1..300bb3c49d 100644--- a/clients/cli/src/main/java/org/apache/gravitino/cli/commands/ListTopics.java+++ b/clients/cli/src/main/java/org/apache/gravitino/cli/commands/ListTopics.java@@ -32,8 +32,11 @@ import org.apache.gravitino.messaging.Topic;/** List the topics. */public class ListTopics extends Command {+ /** The name of the metalake. */protected final String metalake;+ /** The name of the catalog. */protected final String catalog;+ /** The name of the schema. */protected final String schema;/**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.javaindex 6f3905f158..39c24d500f 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@@ -28,9 +28,10 @@ import org.apache.gravitino.cli.ErrorMessages;import org.apache.gravitino.client.GravitinoClient;import org.apache.gravitino.exceptions.NoSuchMetalakeException;-/* Lists all users in a metalake. */+/** Lists all users in a metalake. */public class ListUsers extends Command {+ /** The name of the metalake. */protected final String metalake;/**diff --git a/clients/cli/src/main/java/org/apache/gravitino/cli/commands/MetadataCommand.java b/clients/cli/src/main/java/org/apache/gravitino/cli/commands/MetadataCommand.javaindex 8a417d0e00..5a6adef820 100644--- a/clients/cli/src/main/java/org/apache/gravitino/cli/commands/MetadataCommand.java+++ b/clients/cli/src/main/java/org/apache/gravitino/cli/commands/MetadataCommand.java@@ -26,6 +26,7 @@ import org.apache.gravitino.cli.CommandContext;import org.apache.gravitino.cli.FullName;import org.apache.gravitino.client.GravitinoClient;+/** Represents a command to display metadata about an entity. */public class MetadataCommand extends Command {/**diff --git a/clients/cli/src/main/java/org/apache/gravitino/cli/commands/MetalakeAudit.java b/clients/cli/src/main/java/org/apache/gravitino/cli/commands/MetalakeAudit.javaindex 76d953e5b8..ab3354608b 100644--- a/clients/cli/src/main/java/org/apache/gravitino/cli/commands/MetalakeAudit.java+++ b/clients/cli/src/main/java/org/apache/gravitino/cli/commands/MetalakeAudit.java@@ -27,6 +27,7 @@ import org.apache.gravitino.exceptions.NoSuchMetalakeException;/** Displays the audit information of a metalake. */public class MetalakeAudit extends AuditCommand {+ /** The name of the metalake. */protected final String metalake;/**diff --git a/clients/cli/src/main/java/org/apache/gravitino/cli/commands/MetalakeDetails.java b/clients/cli/src/main/java/org/apache/gravitino/cli/commands/MetalakeDetails.javaindex b427052c0c..7f25f70588 100644--- a/clients/cli/src/main/java/org/apache/gravitino/cli/commands/MetalakeDetails.java+++ b/clients/cli/src/main/java/org/apache/gravitino/cli/commands/MetalakeDetails.java@@ -27,6 +27,7 @@ import org.apache.gravitino.exceptions.NoSuchMetalakeException;/** Displays the details of a metalake. */public class MetalakeDetails extends Command {+ /** The name of the metalake. */protected final String metalake;/**diff --git a/clients/cli/src/main/java/org/apache/gravitino/cli/commands/ModelAudit.java b/clients/cli/src/main/java/org/apache/gravitino/cli/commands/ModelAudit.javaindex b6127937f9..b0c4cd4505 100644--- a/clients/cli/src/main/java/org/apache/gravitino/cli/commands/ModelAudit.java+++ b/clients/cli/src/main/java/org/apache/gravitino/cli/commands/ModelAudit.java@@ -32,9 +32,13 @@ import org.apache.gravitino.model.ModelCatalog;/** Displays the audit information of a model. */public class ModelAudit extends AuditCommand {+ /** The name of the metalake. */protected final String metalake;+ /** The name of the catalog. */protected final String catalog;+ /** The name of the schema. */protected final String schema;+ /** The name of the model. */protected final String model;/**diff --git a/clients/cli/src/main/java/org/apache/gravitino/cli/commands/ModelDetails.java b/clients/cli/src/main/java/org/apache/gravitino/cli/commands/ModelDetails.javaindex a25f069f8a..ba7f0d6d76 100644--- a/clients/cli/src/main/java/org/apache/gravitino/cli/commands/ModelDetails.java+++ b/clients/cli/src/main/java/org/apache/gravitino/cli/commands/ModelDetails.java@@ -32,9 +32,13 @@ import org.apache.gravitino.model.ModelCatalog;/** Displays the details of a model. */public class ModelDetails extends Command {+ /** The name of the metalake. */protected final String metalake;+ /** The name of the catalog. */protected final String catalog;+ /** The name of the schema. */protected final String schema;+ /** The name of the model. */protected final String model;/**diff --git a/clients/cli/src/main/java/org/apache/gravitino/cli/commands/OwnerDetails.java b/clients/cli/src/main/java/org/apache/gravitino/cli/commands/OwnerDetails.javaindex d1ee023825..575ca9bbfa 100644--- a/clients/cli/src/main/java/org/apache/gravitino/cli/commands/OwnerDetails.java+++ b/clients/cli/src/main/java/org/apache/gravitino/cli/commands/OwnerDetails.java@@ -30,10 +30,14 @@ import org.apache.gravitino.client.GravitinoClient;import org.apache.gravitino.exceptions.NoSuchMetadataObjectException;import org.apache.gravitino.exceptions.NoSuchMetalakeException;+/** Represents the detail information of an owner of an entity. */public class OwnerDetails extends Command {+ /** The name of the metalake. */protected final String metalake;+ /** The name of the entity. */protected final String entity;+ /** The type of the entity. */protected final MetadataObject.Type entityType;/**diff --git a/clients/cli/src/main/java/org/apache/gravitino/cli/commands/RegisterModel.java b/clients/cli/src/main/java/org/apache/gravitino/cli/commands/RegisterModel.javaindex 8d86bd32f7..402b3e5ff4 100644--- a/clients/cli/src/main/java/org/apache/gravitino/cli/commands/RegisterModel.java+++ b/clients/cli/src/main/java/org/apache/gravitino/cli/commands/RegisterModel.java@@ -34,11 +34,17 @@ import org.apache.gravitino.model.ModelCatalog;/** Register a model in the catalog */public class RegisterModel extends Command {+ /** The name of the metalake. */protected final String metalake;+ /** The name of the catalog. */protected final String catalog;+ /** The name of the schema. */protected final String schema;+ /** The name of the model. */protected final String model;+ /** The comment of the model version. */protected final String comment;+ /** The properties of the model version. */protected final Map<String, String> properties;/**diff --git a/clients/cli/src/main/java/org/apache/gravitino/cli/commands/RemoveAllRoles.java b/clients/cli/src/main/java/org/apache/gravitino/cli/commands/RemoveAllRoles.javaindex 70dacfd417..47a4a2d3a4 100644--- a/clients/cli/src/main/java/org/apache/gravitino/cli/commands/RemoveAllRoles.java+++ b/clients/cli/src/main/java/org/apache/gravitino/cli/commands/RemoveAllRoles.java@@ -32,8 +32,11 @@ import org.apache.gravitino.exceptions.NoSuchUserException;/** Removes all roles from a group or user. */public class RemoveAllRoles extends Command {+ /** The name of the metalake. */protected final String metalake;+ /** The name of the group or user. */protected final String entity;+ /** The type of the entity (group or user). */protected final String entityType;/**diff --git a/clients/cli/src/main/java/org/apache/gravitino/cli/commands/RemoveAllTags.java b/clients/cli/src/main/java/org/apache/gravitino/cli/commands/RemoveAllTags.javaindex 123f6d32f8..5da6f8c9bf 100644--- a/clients/cli/src/main/java/org/apache/gravitino/cli/commands/RemoveAllTags.java+++ b/clients/cli/src/main/java/org/apache/gravitino/cli/commands/RemoveAllTags.java@@ -40,11 +40,14 @@ import org.apache.gravitino.model.ModelCatalog;import org.apache.gravitino.rel.Table;import org.apache.gravitino.rel.TableCatalog;-/* Removes all the tags of an entity. */+/** Removes all the tags of an entity. */public class RemoveAllTags extends Command {+ /** The name of the metalake. */protected String metalake;+ /** The full name of the entity. */protected FullName name;+ /** If true, the command will not prompt for confirmation. */protected final boolean force;/**diff --git a/clients/cli/src/main/java/org/apache/gravitino/cli/commands/RemoveCatalogProperty.java b/clients/cli/src/main/java/org/apache/gravitino/cli/commands/RemoveCatalogProperty.javaindex dd22b583e2..03e5e2db14 100644--- a/clients/cli/src/main/java/org/apache/gravitino/cli/commands/RemoveCatalogProperty.java+++ b/clients/cli/src/main/java/org/apache/gravitino/cli/commands/RemoveCatalogProperty.java@@ -28,9 +28,11 @@ import org.apache.gravitino.exceptions.NoSuchMetalakeException;/** Remove a property of a catalog. */public class RemoveCatalogProperty extends Command {-+ /** The name of the metalake. */protected final String metalake;+ /** The name of the catalog. */protected final String catalog;+ /** The name of the property. */protected final String property;/**diff --git a/clients/cli/src/main/java/org/apache/gravitino/cli/commands/RemoveFilesetProperty.java b/clients/cli/src/main/java/org/apache/gravitino/cli/commands/RemoveFilesetProperty.javaindex da2bc73f43..80c44bbb65 100644--- a/clients/cli/src/main/java/org/apache/gravitino/cli/commands/RemoveFilesetProperty.java+++ b/clients/cli/src/main/java/org/apache/gravitino/cli/commands/RemoveFilesetProperty.java@@ -32,10 +32,15 @@ import org.apache.gravitino.file.FilesetChange;/** Remove a property of a fileset. */public class RemoveFilesetProperty extends Command {+ /** The name of the metalake. */protected final String metalake;+ /** The name of the catalog. */protected final String catalog;+ /** The name of the schema. */protected final String schema;+ /** The name of the fileset. */protected final String fileset;+ /** The name of the property. */protected final String property;/**diff --git a/clients/cli/src/main/java/org/apache/gravitino/cli/commands/RemoveMetalakeProperty.java b/clients/cli/src/main/java/org/apache/gravitino/cli/commands/RemoveMetalakeProperty.javaindex ad00aa2fd2..5c5daa629d 100644--- a/clients/cli/src/main/java/org/apache/gravitino/cli/commands/RemoveMetalakeProperty.java+++ b/clients/cli/src/main/java/org/apache/gravitino/cli/commands/RemoveMetalakeProperty.java@@ -28,7 +28,9 @@ import org.apache.gravitino.exceptions.NoSuchMetalakeException;/** Remove a property of a metalake. */public class RemoveMetalakeProperty extends Command {+ /** The name of the metalake. */protected final String metalake;+ /** The name of the property. */protected final String property;/**diff --git a/clients/cli/src/main/java/org/apache/gravitino/cli/commands/RemoveModelProperty.java b/clients/cli/src/main/java/org/apache/gravitino/cli/commands/RemoveModelProperty.javaindex ae208a68b5..3fa077ded6 100644--- a/clients/cli/src/main/java/org/apache/gravitino/cli/commands/RemoveModelProperty.java+++ b/clients/cli/src/main/java/org/apache/gravitino/cli/commands/RemoveModelProperty.java@@ -31,10 +31,15 @@ import org.apache.gravitino.model.ModelChange;/** Removes a property of a model. */public class RemoveModelProperty extends Command {+ /** The name of the metalake. */protected final String metalake;+ /** The name of the catalog. */protected final String catalog;+ /** The name of the schema. */protected final String schema;+ /** The name of the model. */protected final String model;+ /** The name of the property to remove. */protected final String property;/**diff --git a/clients/cli/src/main/java/org/apache/gravitino/cli/commands/RemoveRoleFromGroup.java b/clients/cli/src/main/java/org/apache/gravitino/cli/commands/RemoveRoleFromGroup.javaindex 8cd1f18339..23ef742580 100644--- a/clients/cli/src/main/java/org/apache/gravitino/cli/commands/RemoveRoleFromGroup.java+++ b/clients/cli/src/main/java/org/apache/gravitino/cli/commands/RemoveRoleFromGroup.java@@ -30,8 +30,11 @@ import org.apache.gravitino.exceptions.NoSuchUserException;/** Removes a role from a group. */public class RemoveRoleFromGroup extends Command {+ /** The name of the metalake. */protected String metalake;+ /** The name of the group. */protected String group;+ /** The name of the role. */protected String role;/**diff --git a/clients/cli/src/main/java/org/apache/gravitino/cli/commands/RemoveRoleFromUser.java b/clients/cli/src/main/java/org/apache/gravitino/cli/commands/RemoveRoleFromUser.javaindex d45db16133..ddf2683e14 100644--- a/clients/cli/src/main/java/org/apache/gravitino/cli/commands/RemoveRoleFromUser.java+++ b/clients/cli/src/main/java/org/apache/gravitino/cli/commands/RemoveRoleFromUser.java@@ -30,8 +30,11 @@ import org.apache.gravitino.exceptions.NoSuchUserException;/** Removes a role from a user. */public class RemoveRoleFromUser extends Command {+ /** The name of the metalake. */protected String metalake;+ /** The name of the user. */protected String user;+ /** The name of the role. */protected String role;/**diff --git a/clients/cli/src/main/java/org/apache/gravitino/cli/commands/RemoveSchemaProperty.java b/clients/cli/src/main/java/org/apache/gravitino/cli/commands/RemoveSchemaProperty.javaindex 7a7c9dd62d..779a72b3ce 100644--- a/clients/cli/src/main/java/org/apache/gravitino/cli/commands/RemoveSchemaProperty.java+++ b/clients/cli/src/main/java/org/apache/gravitino/cli/commands/RemoveSchemaProperty.java@@ -30,9 +30,13 @@ import org.apache.gravitino.exceptions.NoSuchSchemaException;/** Remove a property of a schema. */public class RemoveSchemaProperty extends Command {+ /** The name of the metalake. */protected final String metalake;+ /** The name of the catalog. */protected final String catalog;+ /** The name of the schema. */protected final String schema;+ /** The name of the property. */protected final String property;/**diff --git a/clients/cli/src/main/java/org/apache/gravitino/cli/commands/RemoveTableProperty.java b/clients/cli/src/main/java/org/apache/gravitino/cli/commands/RemoveTableProperty.javaindex 6197a16205..f4cf64b62c 100644--- a/clients/cli/src/main/java/org/apache/gravitino/cli/commands/RemoveTableProperty.java+++ b/clients/cli/src/main/java/org/apache/gravitino/cli/commands/RemoveTableProperty.java@@ -32,10 +32,15 @@ import org.apache.gravitino.rel.TableChange;/** Remove a property of a table. */public class RemoveTableProperty extends Command {+ /** The name of the metalake. */protected final String metalake;+ /** The name of the catalog. */protected final String catalog;+ /** The name of the schema. */protected final String schema;+ /** The name of the table. */protected final String table;+ /** The name of the property. */protected final String property;/**diff --git a/clients/cli/src/main/java/org/apache/gravitino/cli/commands/RemoveTagProperty.java b/clients/cli/src/main/java/org/apache/gravitino/cli/commands/RemoveTagProperty.javaindex b92cd5cc45..3c17671ebc 100644--- a/clients/cli/src/main/java/org/apache/gravitino/cli/commands/RemoveTagProperty.java+++ b/clients/cli/src/main/java/org/apache/gravitino/cli/commands/RemoveTagProperty.java@@ -29,8 +29,11 @@ import org.apache.gravitino.tag.TagChange;/** Remove a property of a tag. */public class RemoveTagProperty extends Command {+ /** The name of the metalake. */protected final String metalake;+ /** The name of the tag. */protected final String tag;+ /** The name of the property. */protected final String property;/**diff --git a/clients/cli/src/main/java/org/apache/gravitino/cli/commands/RemoveTopicProperty.java b/clients/cli/src/main/java/org/apache/gravitino/cli/commands/RemoveTopicProperty.javaindex 497088c1be..8fd81e2626 100644--- a/clients/cli/src/main/java/org/apache/gravitino/cli/commands/RemoveTopicProperty.java+++ b/clients/cli/src/main/java/org/apache/gravitino/cli/commands/RemoveTopicProperty.java@@ -32,10 +32,15 @@ import org.apache.gravitino.messaging.TopicChange;/** Remove a property of a topic. */public class RemoveTopicProperty extends Command {+ /** The name of the metalake. */protected final String metalake;+ /** The name of the catalog. */protected final String catalog;+ /** The name of the schema. */protected final String schema;+ /** The name of the topic. */protected final String topic;+ /** The name of the property. */protected final String property;/**diff --git a/clients/cli/src/main/java/org/apache/gravitino/cli/commands/RevokeAllPrivileges.java b/clients/cli/src/main/java/org/apache/gravitino/cli/commands/RevokeAllPrivileges.javaindex 2b059b9aff..cb79bb0f01 100644--- a/clients/cli/src/main/java/org/apache/gravitino/cli/commands/RevokeAllPrivileges.java+++ b/clients/cli/src/main/java/org/apache/gravitino/cli/commands/RevokeAllPrivileges.java@@ -40,8 +40,11 @@ import org.apache.gravitino.exceptions.NoSuchRoleException;/** Revokes all privileges from a role to an entity or all entities. */public class RevokeAllPrivileges extends MetadataCommand {+ /** The name of the metalake. */protected final String metalake;+ /** The name of the role. */protected final String role;+ /** The full name of the entity. */protected final FullName entity;/**diff --git a/clients/cli/src/main/java/org/apache/gravitino/cli/commands/RevokePrivilegesFromRole.java b/clients/cli/src/main/java/org/apache/gravitino/cli/commands/RevokePrivilegesFromRole.javaindex c1e80708b3..1874b6d904 100644--- a/clients/cli/src/main/java/org/apache/gravitino/cli/commands/RevokePrivilegesFromRole.java+++ b/clients/cli/src/main/java/org/apache/gravitino/cli/commands/RevokePrivilegesFromRole.java@@ -36,9 +36,13 @@ import org.apache.gravitino.exceptions.NoSuchRoleException;/** Revokes one or more privileges. */public class RevokePrivilegesFromRole extends MetadataCommand {+ /** The name of the metalake. */protected final String metalake;+ /** The name of the role. */protected final String role;+ /** The full name of the entity. */protected final FullName entity;+ /** The list of privileges. */protected final String[] privileges;/**diff --git a/clients/cli/src/main/java/org/apache/gravitino/cli/commands/RoleAudit.java b/clients/cli/src/main/java/org/apache/gravitino/cli/commands/RoleAudit.javaindex f512a3089b..424c41825c 100644--- a/clients/cli/src/main/java/org/apache/gravitino/cli/commands/RoleAudit.java+++ b/clients/cli/src/main/java/org/apache/gravitino/cli/commands/RoleAudit.java@@ -26,9 +26,12 @@ import org.apache.gravitino.client.GravitinoClient;import org.apache.gravitino.exceptions.NoSuchMetalakeException;import org.apache.gravitino.exceptions.NoSuchRoleException;+/** Represents the audit information of a role. */public class RoleAudit extends AuditCommand {+ /** The name of the metalake. */protected final String metalake;+ /** The name of the role. */protected final String role;/**diff --git a/clients/cli/src/main/java/org/apache/gravitino/cli/commands/RoleDetails.java b/clients/cli/src/main/java/org/apache/gravitino/cli/commands/RoleDetails.javaindex 57e79131eb..645cafba4a 100644--- a/clients/cli/src/main/java/org/apache/gravitino/cli/commands/RoleDetails.java+++ b/clients/cli/src/main/java/org/apache/gravitino/cli/commands/RoleDetails.java@@ -27,9 +27,12 @@ import org.apache.gravitino.client.GravitinoClient;import org.apache.gravitino.exceptions.NoSuchMetalakeException;import org.apache.gravitino.exceptions.NoSuchRoleException;+/** Represents the detail information of a role. */public class RoleDetails extends Command {+ /** The name of the metalake. */protected String metalake;+ /** The name of the role. */protected String role;/**diff --git a/clients/cli/src/main/java/org/apache/gravitino/cli/commands/SchemaAudit.java b/clients/cli/src/main/java/org/apache/gravitino/cli/commands/SchemaAudit.javaindex db01ed437b..caf2704b6d 100644--- a/clients/cli/src/main/java/org/apache/gravitino/cli/commands/SchemaAudit.java+++ b/clients/cli/src/main/java/org/apache/gravitino/cli/commands/SchemaAudit.java@@ -30,8 +30,11 @@ import org.apache.gravitino.exceptions.NoSuchSchemaException;/** Displays the audit information of schema. */public class SchemaAudit extends AuditCommand {+ /** The name of the metalake. */protected final String metalake;+ /** The name of the catalog. */protected final String catalog;+ /** The name of the schema. */protected final String schema;/**diff --git a/clients/cli/src/main/java/org/apache/gravitino/cli/commands/SchemaDetails.java b/clients/cli/src/main/java/org/apache/gravitino/cli/commands/SchemaDetails.javaindex 560fca20df..704b75fcd1 100644--- a/clients/cli/src/main/java/org/apache/gravitino/cli/commands/SchemaDetails.java+++ b/clients/cli/src/main/java/org/apache/gravitino/cli/commands/SchemaDetails.java@@ -30,8 +30,11 @@ import org.apache.gravitino.exceptions.NoSuchSchemaException;/** Displays the details of schema. */public class SchemaDetails extends Command {+ /** The name of the metalake. */protected final String metalake;+ /** The name of the catalog. */protected final String catalog;+ /** The name of the schema. */protected final String schema;/**diff --git a/clients/cli/src/main/java/org/apache/gravitino/cli/commands/SetCatalogProperty.java b/clients/cli/src/main/java/org/apache/gravitino/cli/commands/SetCatalogProperty.javaindex a255835f43..c9e11debab 100644--- a/clients/cli/src/main/java/org/apache/gravitino/cli/commands/SetCatalogProperty.java+++ b/clients/cli/src/main/java/org/apache/gravitino/cli/commands/SetCatalogProperty.java@@ -29,9 +29,13 @@ import org.apache.gravitino.exceptions.NoSuchMetalakeException;/** Set a property of a catalog. */public class SetCatalogProperty extends Command {+ /** The name of the metalake. */protected final String metalake;+ /** The name of the catalog. */protected final String catalog;+ /** The name of the property. */protected final String property;+ /** The value of the property. */protected final String value;/**diff --git a/clients/cli/src/main/java/org/apache/gravitino/cli/commands/SetFilesetProperty.java b/clients/cli/src/main/java/org/apache/gravitino/cli/commands/SetFilesetProperty.javaindex 8f837dc766..99a771900f 100644--- a/clients/cli/src/main/java/org/apache/gravitino/cli/commands/SetFilesetProperty.java+++ b/clients/cli/src/main/java/org/apache/gravitino/cli/commands/SetFilesetProperty.java@@ -32,11 +32,17 @@ import org.apache.gravitino.file.FilesetChange;/** Set a property of a fileset. */public class SetFilesetProperty extends Command {+ /** The name of the metalake. */protected final String metalake;+ /** The name of the catalog. */protected final String catalog;+ /** The name of the schema. */protected final String schema;+ /** The name of the fileset. */protected final String fileset;+ /** The name of the property. */protected final String property;+ /** The value of the property. */protected final String value;/**diff --git a/clients/cli/src/main/java/org/apache/gravitino/cli/commands/SetMetalakeProperty.java b/clients/cli/src/main/java/org/apache/gravitino/cli/commands/SetMetalakeProperty.javaindex 330ebb6398..b79a8ef9b6 100644--- a/clients/cli/src/main/java/org/apache/gravitino/cli/commands/SetMetalakeProperty.java+++ b/clients/cli/src/main/java/org/apache/gravitino/cli/commands/SetMetalakeProperty.java@@ -28,8 +28,11 @@ import org.apache.gravitino.exceptions.NoSuchMetalakeException;/** Set a property of a metalake. */public class SetMetalakeProperty extends Command {+ /** The name of the metalake. */protected final String metalake;+ /** The name of the property. */protected final String property;+ /** The value of the property. */protected final String value;/**diff --git a/clients/cli/src/main/java/org/apache/gravitino/cli/commands/SetOwner.java b/clients/cli/src/main/java/org/apache/gravitino/cli/commands/SetOwner.javaindex cfc2fcfd6b..a72989d8a0 100644--- a/clients/cli/src/main/java/org/apache/gravitino/cli/commands/SetOwner.java+++ b/clients/cli/src/main/java/org/apache/gravitino/cli/commands/SetOwner.java@@ -29,12 +29,18 @@ import org.apache.gravitino.client.GravitinoClient;import org.apache.gravitino.exceptions.NoSuchMetadataObjectException;import org.apache.gravitino.exceptions.NoSuchMetalakeException;+/** Represents set the owner of an entity */public class SetOwner extends Command {+ /** The name of the command. */protected final String metalake;+ /** The name of the entity. */protected final String entity;+ /** The type of the entity. */protected final MetadataObject.Type entityType;+ /** The new owner. */protected final String owner;+ /** True if the owner is a group, false if it is not. */protected final boolean isGroup;/**diff --git a/clients/cli/src/main/java/org/apache/gravitino/cli/commands/SetSchemaProperty.java b/clients/cli/src/main/java/org/apache/gravitino/cli/commands/SetSchemaProperty.javaindex 854befc747..a5c88ef159 100644--- a/clients/cli/src/main/java/org/apache/gravitino/cli/commands/SetSchemaProperty.java+++ b/clients/cli/src/main/java/org/apache/gravitino/cli/commands/SetSchemaProperty.java@@ -30,10 +30,15 @@ import org.apache.gravitino.exceptions.NoSuchSchemaException;/** Set a property of a schema. */public class SetSchemaProperty extends Command {+ /** The name of the metalake. */protected final String metalake;+ /** The name of the catalog. */protected final String catalog;+ /** The name of the schema. */protected final String schema;+ /** The name of the property. */protected final String property;+ /** The value of the property. */protected final String value;/**diff --git a/clients/cli/src/main/java/org/apache/gravitino/cli/commands/SetTableProperty.java b/clients/cli/src/main/java/org/apache/gravitino/cli/commands/SetTableProperty.javaindex 53b121e1d3..dfa12f2e63 100644--- a/clients/cli/src/main/java/org/apache/gravitino/cli/commands/SetTableProperty.java+++ b/clients/cli/src/main/java/org/apache/gravitino/cli/commands/SetTableProperty.java@@ -32,11 +32,17 @@ import org.apache.gravitino.rel.TableChange;/** Set a property of a table. */public class SetTableProperty extends Command {+ /** The name of the metalake. */protected final String metalake;+ /** The name of the catalog. */protected final String catalog;+ /** The name of the schema. */protected final String schema;+ /** The name of the table. */protected final String table;+ /** The name of the property. */protected final String property;+ /** The value of the property. */protected final String value;/**diff --git a/clients/cli/src/main/java/org/apache/gravitino/cli/commands/SetTagProperty.java b/clients/cli/src/main/java/org/apache/gravitino/cli/commands/SetTagProperty.javaindex e0b66e6e6d..11410dd2ad 100644--- a/clients/cli/src/main/java/org/apache/gravitino/cli/commands/SetTagProperty.java+++ b/clients/cli/src/main/java/org/apache/gravitino/cli/commands/SetTagProperty.java@@ -29,9 +29,13 @@ import org.apache.gravitino.tag.TagChange;/** Set a property of a tag. */public class SetTagProperty extends Command {+ /** The name of the metalake. */protected final String metalake;+ /** The name of the tag. */protected final String tag;+ /** The name of the property. */protected final String property;+ /** The value of the property. */protected final String value;/**diff --git a/clients/cli/src/main/java/org/apache/gravitino/cli/commands/SetTopicProperty.java b/clients/cli/src/main/java/org/apache/gravitino/cli/commands/SetTopicProperty.javaindex 67bedc88d7..f94ec24f64 100644--- a/clients/cli/src/main/java/org/apache/gravitino/cli/commands/SetTopicProperty.java+++ b/clients/cli/src/main/java/org/apache/gravitino/cli/commands/SetTopicProperty.java@@ -32,11 +32,17 @@ import org.apache.gravitino.messaging.TopicChange;/** Set a property of a topic. */public class SetTopicProperty extends Command {+ /** The name of the metalake. */protected final String metalake;+ /** The name of the catalog. */protected final String catalog;+ /** The name of the schema. */protected final String schema;+ /** The name of the topic. */protected final String topic;+ /** The name of the property. */protected final String property;+ /** The value of the property. */protected final String value;/**diff --git a/clients/cli/src/main/java/org/apache/gravitino/cli/commands/TableAudit.java b/clients/cli/src/main/java/org/apache/gravitino/cli/commands/TableAudit.javaindex 1e4ef0b91f..48eed9e5de 100644--- a/clients/cli/src/main/java/org/apache/gravitino/cli/commands/TableAudit.java+++ b/clients/cli/src/main/java/org/apache/gravitino/cli/commands/TableAudit.java@@ -26,7 +26,9 @@ import org.apache.gravitino.rel.Table;/** Displays the audit information of a table. */public class TableAudit extends TableCommand {+ /** The name of the schema. */protected final String schema;+ /** The name of the table. */protected final String table;/**diff --git a/clients/cli/src/main/java/org/apache/gravitino/cli/commands/TableCommand.java b/clients/cli/src/main/java/org/apache/gravitino/cli/commands/TableCommand.javaindex 11390cf633..f0938fe2d4 100644--- a/clients/cli/src/main/java/org/apache/gravitino/cli/commands/TableCommand.java+++ b/clients/cli/src/main/java/org/apache/gravitino/cli/commands/TableCommand.java@@ -28,19 +28,28 @@ import org.apache.gravitino.exceptions.NoSuchSchemaException;import org.apache.gravitino.exceptions.NoSuchTableException;import org.apache.gravitino.rel.TableCatalog;-/* Common code for all table commands. */+/** Common code for all table commands. */public class TableCommand extends AuditCommand {+ /** The metalake and catalog for the table. */protected final String metalake;+ /** The catalog for the table. */protected final String catalog;+ /**+ * Create a new instance of the command.+ *+ * @param context The command context.+ * @param metalake The metalake for the table.+ * @param catalog The catalog for the table.+ */public TableCommand(CommandContext context, String metalake, String catalog) {super(context);this.metalake = metalake;this.catalog = catalog;}- /* Overridden in parent - do nothing */+ /** Overridden in parent - do nothing */@Overridepublic void handle() {}diff --git a/clients/cli/src/main/java/org/apache/gravitino/cli/commands/TableDetails.java b/clients/cli/src/main/java/org/apache/gravitino/cli/commands/TableDetails.javaindex 23950e7ee9..53a2636cce 100644--- a/clients/cli/src/main/java/org/apache/gravitino/cli/commands/TableDetails.java+++ b/clients/cli/src/main/java/org/apache/gravitino/cli/commands/TableDetails.java@@ -26,7 +26,9 @@ import org.apache.gravitino.rel.Table;/** Displays the details of a table. */public class TableDetails extends TableCommand {+ /** The name of the schema. */protected final String schema;+ /** The name of the table. */protected final String table;/**diff --git a/clients/cli/src/main/java/org/apache/gravitino/cli/commands/TableDistribution.java b/clients/cli/src/main/java/org/apache/gravitino/cli/commands/TableDistribution.javaindex 958715ead5..5a24713e3d 100644--- a/clients/cli/src/main/java/org/apache/gravitino/cli/commands/TableDistribution.java+++ b/clients/cli/src/main/java/org/apache/gravitino/cli/commands/TableDistribution.java@@ -26,7 +26,9 @@ import org.apache.gravitino.rel.expressions.distributions.Distribution;/** Displays the details of a table's distirbution. */public class TableDistribution extends TableCommand {+ /** The name of the schema. */protected final String schema;+ /** The name of the table. */protected final String table;/**diff --git a/clients/cli/src/main/java/org/apache/gravitino/cli/commands/TablePartition.java b/clients/cli/src/main/java/org/apache/gravitino/cli/commands/TablePartition.javaindex 352386383b..48f5dcb4cf 100644--- a/clients/cli/src/main/java/org/apache/gravitino/cli/commands/TablePartition.java+++ b/clients/cli/src/main/java/org/apache/gravitino/cli/commands/TablePartition.java@@ -27,7 +27,9 @@ import org.apache.gravitino.rel.partitions.Partition;/** Displays the details of a table's partition. */public class TablePartition extends TableCommand {+ /** The name of the schema. */protected final String schema;+ /** The name of the table. */protected final String table;/**diff --git a/clients/cli/src/main/java/org/apache/gravitino/cli/commands/TableSortOrder.java b/clients/cli/src/main/java/org/apache/gravitino/cli/commands/TableSortOrder.javaindex 2d352b16b3..9f20be926c 100644--- a/clients/cli/src/main/java/org/apache/gravitino/cli/commands/TableSortOrder.java+++ b/clients/cli/src/main/java/org/apache/gravitino/cli/commands/TableSortOrder.java@@ -26,7 +26,9 @@ import org.apache.gravitino.rel.expressions.sorts.SortOrder;/** Displays the details of a table's sort order. */public class TableSortOrder extends TableCommand {+ /** The name of the schema. */protected final String schema;+ /** The name of the table. */protected final String table;/**diff --git a/clients/cli/src/main/java/org/apache/gravitino/cli/commands/TagDetails.java b/clients/cli/src/main/java/org/apache/gravitino/cli/commands/TagDetails.javaindex e3d1073143..2f584d66b0 100644--- a/clients/cli/src/main/java/org/apache/gravitino/cli/commands/TagDetails.java+++ b/clients/cli/src/main/java/org/apache/gravitino/cli/commands/TagDetails.java@@ -26,9 +26,12 @@ import org.apache.gravitino.exceptions.NoSuchCatalogException;import org.apache.gravitino.exceptions.NoSuchMetalakeException;import org.apache.gravitino.tag.Tag;+/** Represents the detail information of a tag. */public class TagDetails extends Command {+ /** The name of the metalake. */protected final String metalake;+ /** The name of the tag. */protected final String tag;/**diff --git a/clients/cli/src/main/java/org/apache/gravitino/cli/commands/TagEntity.java b/clients/cli/src/main/java/org/apache/gravitino/cli/commands/TagEntity.javaindex 0ad1215cec..82cba89d3d 100644--- a/clients/cli/src/main/java/org/apache/gravitino/cli/commands/TagEntity.java+++ b/clients/cli/src/main/java/org/apache/gravitino/cli/commands/TagEntity.java@@ -36,9 +36,13 @@ import org.apache.gravitino.messaging.Topic;import org.apache.gravitino.model.Model;import org.apache.gravitino.rel.Table;+/** Represents add tags for an entity. */public class TagEntity extends Command {+ /** The name of the metalake. */protected final String metalake;+ /** The name of the entity. */protected final FullName name;+ /** The list of the tags to add. */protected final String[] tags;/**diff --git a/clients/cli/src/main/java/org/apache/gravitino/cli/commands/TopicDetails.java b/clients/cli/src/main/java/org/apache/gravitino/cli/commands/TopicDetails.javaindex 79b7dd98d1..17b6793f1a 100644--- a/clients/cli/src/main/java/org/apache/gravitino/cli/commands/TopicDetails.java+++ b/clients/cli/src/main/java/org/apache/gravitino/cli/commands/TopicDetails.java@@ -32,9 +32,13 @@ import org.apache.gravitino.messaging.Topic;/** Displays the details of a topic. */public class TopicDetails extends Command {+ /** The name of the metalake. */protected final String metalake;+ /** The name of the catalog. */protected final String catalog;+ /** The name of the schema. */protected final String schema;+ /** The name of the topic. */protected final String topic;/**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.javaindex cacfd8a055..86368b6708 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@@ -35,9 +35,13 @@ import org.apache.gravitino.messaging.Topic;import org.apache.gravitino.model.Model;import org.apache.gravitino.rel.Table;+/** Represents untag entity command. */public class UntagEntity extends Command {+ /** The name of the metalake. */protected final String metalake;+ /** The full name of the entity. */protected final FullName name;+ /** The names of the tags to remove. */protected final String[] tags;/**diff --git a/clients/cli/src/main/java/org/apache/gravitino/cli/commands/UpdateCatalogComment.java b/clients/cli/src/main/java/org/apache/gravitino/cli/commands/UpdateCatalogComment.javaindex b058bf32f5..593a66eb22 100644--- a/clients/cli/src/main/java/org/apache/gravitino/cli/commands/UpdateCatalogComment.java+++ b/clients/cli/src/main/java/org/apache/gravitino/cli/commands/UpdateCatalogComment.java@@ -29,8 +29,11 @@ import org.apache.gravitino.exceptions.NoSuchMetalakeException;/** Update the comment of a catalog. */public class UpdateCatalogComment extends Command {+ /** The name of the command. */protected final String metalake;+ /** The name of the catalog. */protected final String catalog;+ /** New metalake comment. */protected final String comment;/**diff --git a/clients/cli/src/main/java/org/apache/gravitino/cli/commands/UpdateCatalogName.java b/clients/cli/src/main/java/org/apache/gravitino/cli/commands/UpdateCatalogName.javaindex ab7a1db4e5..6b9a9243c2 100644--- a/clients/cli/src/main/java/org/apache/gravitino/cli/commands/UpdateCatalogName.java+++ b/clients/cli/src/main/java/org/apache/gravitino/cli/commands/UpdateCatalogName.java@@ -29,8 +29,11 @@ import org.apache.gravitino.exceptions.NoSuchMetalakeException;/** Update the name of a catalog. */public class UpdateCatalogName extends Command {+ /** The name of the metalake. */protected final String metalake;+ /** The name of the catalog. */protected final String catalog;+ /** The new catalog name. */protected final String name;/**diff --git a/clients/cli/src/main/java/org/apache/gravitino/cli/commands/UpdateColumnAutoIncrement.java b/clients/cli/src/main/java/org/apache/gravitino/cli/commands/UpdateColumnAutoIncrement.javaindex 44b114e0a2..76ef7433fd 100644--- a/clients/cli/src/main/java/org/apache/gravitino/cli/commands/UpdateColumnAutoIncrement.java+++ b/clients/cli/src/main/java/org/apache/gravitino/cli/commands/UpdateColumnAutoIncrement.java@@ -33,11 +33,17 @@ import org.apache.gravitino.rel.TableChange;/** Update the auto increment of a column. */public class UpdateColumnAutoIncrement extends Command {+ /** The name of the command. */protected final String metalake;+ /** The name of the catalog. */protected final String catalog;+ /** The name of the schema. */protected final String schema;+ /** The name of the table. */protected final String table;+ /** The name of the column. */protected final String column;+ /** True if the column can be null, false if it must have non-null values. */protected final boolean autoincrement;/**diff --git a/clients/cli/src/main/java/org/apache/gravitino/cli/commands/UpdateColumnComment.java b/clients/cli/src/main/java/org/apache/gravitino/cli/commands/UpdateColumnComment.javaindex 85413f1e8f..5ecef24914 100644--- a/clients/cli/src/main/java/org/apache/gravitino/cli/commands/UpdateColumnComment.java+++ b/clients/cli/src/main/java/org/apache/gravitino/cli/commands/UpdateColumnComment.java@@ -33,11 +33,17 @@ import org.apache.gravitino.rel.TableChange;/** Update the comment of a column. */public class UpdateColumnComment extends Command {+ /** The name of the command. */protected final String metalake;+ /** The name of the catalog. */protected final String catalog;+ /** The name of the schema. */protected final String schema;+ /** The name of the table. */protected final String table;+ /** The name of the column. */protected final String column;+ /** New column comment. */protected final String comment;/**diff --git a/clients/cli/src/main/java/org/apache/gravitino/cli/commands/UpdateColumnDatatype.java b/clients/cli/src/main/java/org/apache/gravitino/cli/commands/UpdateColumnDatatype.javaindex 29e44b648d..e01e569932 100644--- a/clients/cli/src/main/java/org/apache/gravitino/cli/commands/UpdateColumnDatatype.java+++ b/clients/cli/src/main/java/org/apache/gravitino/cli/commands/UpdateColumnDatatype.java@@ -35,11 +35,17 @@ import org.apache.gravitino.rel.types.Type;/** Update the data type of a column. */public class UpdateColumnDatatype extends Command {+ /** The name of the command. */protected final String metalake;+ /** The name of the catalog. */protected final String catalog;+ /** The name of the schema. */protected final String schema;+ /** The name of the table. */protected final String table;+ /** The name of the column. */protected final String column;+ /** The new data type name. */protected final String datatype;/**diff --git a/clients/cli/src/main/java/org/apache/gravitino/cli/commands/UpdateColumnDefault.java b/clients/cli/src/main/java/org/apache/gravitino/cli/commands/UpdateColumnDefault.javaindex cf8a49c47c..6a12b3ce10 100644--- a/clients/cli/src/main/java/org/apache/gravitino/cli/commands/UpdateColumnDefault.java+++ b/clients/cli/src/main/java/org/apache/gravitino/cli/commands/UpdateColumnDefault.java@@ -34,12 +34,19 @@ import org.apache.gravitino.rel.TableChange;/** Update the default type of a column. */public class UpdateColumnDefault extends Command {+ /** The name of the command. */protected final String metalake;+ /** The name of the catalog. */protected final String catalog;+ /** The name of the schema. */protected final String schema;+ /** The name of the table. */protected final String table;+ /** The name of the column. */protected final String column;+ /** The new default value. */protected final String defaultValue;+ /** The new default data type. */protected final String dataType;/**diff --git a/clients/cli/src/main/java/org/apache/gravitino/cli/commands/UpdateColumnName.java b/clients/cli/src/main/java/org/apache/gravitino/cli/commands/UpdateColumnName.javaindex 74865f4c44..a80831b421 100644--- a/clients/cli/src/main/java/org/apache/gravitino/cli/commands/UpdateColumnName.java+++ b/clients/cli/src/main/java/org/apache/gravitino/cli/commands/UpdateColumnName.java@@ -33,11 +33,17 @@ import org.apache.gravitino.rel.TableChange;/** Update the name of a column. */public class UpdateColumnName extends Command {+ /** The name of the metalake. */protected final String metalake;+ /** The name of the catalog. */protected final String catalog;+ /** The name of the schema. */protected final String schema;+ /** The name of the table. */protected final String table;+ /** The name of the column. */protected final String column;+ /** The new column name. */protected final String name;/**diff --git a/clients/cli/src/main/java/org/apache/gravitino/cli/commands/UpdateColumnNullability.java b/clients/cli/src/main/java/org/apache/gravitino/cli/commands/UpdateColumnNullability.javaindex dce5c23aa2..7cc3d7a7d9 100644--- a/clients/cli/src/main/java/org/apache/gravitino/cli/commands/UpdateColumnNullability.java+++ b/clients/cli/src/main/java/org/apache/gravitino/cli/commands/UpdateColumnNullability.java@@ -33,11 +33,17 @@ import org.apache.gravitino.rel.TableChange;/** Update the nullability of a column. */public class UpdateColumnNullability extends Command {+ /** The name of the metalake. */protected final String metalake;+ /** The name of the catalog. */protected final String catalog;+ /** The name of the schema. */protected final String schema;+ /** The name of the table. */protected final String table;+ /** The name of the column. */protected final String column;+ /** The new nullability of the column. */protected final boolean nullability;/**diff --git a/clients/cli/src/main/java/org/apache/gravitino/cli/commands/UpdateColumnPosition.java b/clients/cli/src/main/java/org/apache/gravitino/cli/commands/UpdateColumnPosition.javaindex ba79aece7c..0d87b17b92 100644--- a/clients/cli/src/main/java/org/apache/gravitino/cli/commands/UpdateColumnPosition.java+++ b/clients/cli/src/main/java/org/apache/gravitino/cli/commands/UpdateColumnPosition.java@@ -34,11 +34,17 @@ import org.apache.gravitino.rel.TableChange;/** Update the position of a column. */public class UpdateColumnPosition extends Command {+ /** The name of the metalake. */protected final String metalake;+ /** The name of the catalog. */protected final String catalog;+ /** The name of the schema. */protected final String schema;+ /** The name of the table. */protected final String table;+ /** The name of the column. */protected final String column;+ /** The new position of the column. */protected final String position;/**diff --git a/clients/cli/src/main/java/org/apache/gravitino/cli/commands/UpdateFilesetComment.java b/clients/cli/src/main/java/org/apache/gravitino/cli/commands/UpdateFilesetComment.javaindex b3ba771ad4..d95f502389 100644--- a/clients/cli/src/main/java/org/apache/gravitino/cli/commands/UpdateFilesetComment.java+++ b/clients/cli/src/main/java/org/apache/gravitino/cli/commands/UpdateFilesetComment.java@@ -32,10 +32,15 @@ import org.apache.gravitino.file.FilesetChange;/** Update the comment of a catalog. */public class UpdateFilesetComment extends Command {+ /** The name of the metalake. */protected final String metalake;+ /** The name of the catalog. */protected final String catalog;+ /** The name of the schema. */protected final String schema;+ /** The name of the fileset. */protected final String fileset;+ /** The new comment for the fileset. */protected final String comment;/**diff --git a/clients/cli/src/main/java/org/apache/gravitino/cli/commands/UpdateFilesetName.java b/clients/cli/src/main/java/org/apache/gravitino/cli/commands/UpdateFilesetName.javaindex 21a192522a..bc373221d9 100644--- a/clients/cli/src/main/java/org/apache/gravitino/cli/commands/UpdateFilesetName.java+++ b/clients/cli/src/main/java/org/apache/gravitino/cli/commands/UpdateFilesetName.java@@ -32,10 +32,15 @@ import org.apache.gravitino.file.FilesetChange;/** Update the name of a fileset. */public class UpdateFilesetName extends Command {+ /** The name of the metalake. */protected final String metalake;+ /** The name of the catalog. */protected final String catalog;+ /** The name of the schema. */protected final String schema;+ /** The name of the fileset. */protected final String fileset;+ /** The new fileset name. */protected final String name;/**diff --git a/clients/cli/src/main/java/org/apache/gravitino/cli/commands/UpdateMetalakeComment.java b/clients/cli/src/main/java/org/apache/gravitino/cli/commands/UpdateMetalakeComment.javaindex 96a5a92741..8a30b89b3d 100644--- a/clients/cli/src/main/java/org/apache/gravitino/cli/commands/UpdateMetalakeComment.java+++ b/clients/cli/src/main/java/org/apache/gravitino/cli/commands/UpdateMetalakeComment.java@@ -28,7 +28,9 @@ import org.apache.gravitino.exceptions.NoSuchMetalakeException;/** Update the comment of a metalake. */public class UpdateMetalakeComment extends Command {+ /** The name of the metalake. */protected final String metalake;+ /** The new metalake comment. */protected final String comment;/**diff --git a/clients/cli/src/main/java/org/apache/gravitino/cli/commands/UpdateMetalakeName.java b/clients/cli/src/main/java/org/apache/gravitino/cli/commands/UpdateMetalakeName.javaindex 60497d034d..ad54a92509 100644--- a/clients/cli/src/main/java/org/apache/gravitino/cli/commands/UpdateMetalakeName.java+++ b/clients/cli/src/main/java/org/apache/gravitino/cli/commands/UpdateMetalakeName.java@@ -29,8 +29,11 @@ import org.apache.gravitino.exceptions.NoSuchMetalakeException;/** Update the name of a metalake. */public class UpdateMetalakeName extends Command {+ /** The name of the metalake to update. */protected final String metalake;+ /** The new name of the metalake. */protected final String name;+ /** Whether to force the update. */protected final boolean force;/**diff --git a/clients/cli/src/main/java/org/apache/gravitino/cli/commands/UpdateModelComment.java b/clients/cli/src/main/java/org/apache/gravitino/cli/commands/UpdateModelComment.javaindex 1e34189f97..6f113b2c69 100644--- a/clients/cli/src/main/java/org/apache/gravitino/cli/commands/UpdateModelComment.java+++ b/clients/cli/src/main/java/org/apache/gravitino/cli/commands/UpdateModelComment.java@@ -31,10 +31,15 @@ import org.apache.gravitino.model.ModelChange;/** Update the comment of a model. */public class UpdateModelComment extends Command {+ /** The metalake name. */protected final String metalake;+ /** The catalog name. */protected final String catalog;+ /** The schema name. */protected final String schema;+ /** The model name. */protected final String model;+ /** The new comment. */protected final String comment;/**diff --git a/clients/cli/src/main/java/org/apache/gravitino/cli/commands/UpdateModelName.java b/clients/cli/src/main/java/org/apache/gravitino/cli/commands/UpdateModelName.javaindex 853aaf35ce..2d69d69e4a 100644--- a/clients/cli/src/main/java/org/apache/gravitino/cli/commands/UpdateModelName.java+++ b/clients/cli/src/main/java/org/apache/gravitino/cli/commands/UpdateModelName.java@@ -31,10 +31,15 @@ import org.apache.gravitino.model.ModelChange;/** Update the name of a model. */public class UpdateModelName extends Command {+ /** The name of the metalake. */protected final String metalake;+ /** The name of the catalog. */protected final String catalog;+ /** The name of the schema. */protected final String schema;+ /** The name of the model. */protected final String model;+ /** The new model name. */protected final String name;/**diff --git a/clients/cli/src/main/java/org/apache/gravitino/cli/commands/UpdateModelVersionAliases.java b/clients/cli/src/main/java/org/apache/gravitino/cli/commands/UpdateModelVersionAliases.javaindex 384b58da76..cdcc377a96 100644--- a/clients/cli/src/main/java/org/apache/gravitino/cli/commands/UpdateModelVersionAliases.java+++ b/clients/cli/src/main/java/org/apache/gravitino/cli/commands/UpdateModelVersionAliases.java@@ -32,11 +32,17 @@ import org.apache.gravitino.model.ModelVersionChange;/** Update the aliases of a model version. */public class UpdateModelVersionAliases extends Command {+ /** The name of the metalake. */protected final String metalake;+ /** The name of the catalog. */protected final String catalog;+ /** The name of the schema. */protected final String schema;+ /** The name of the model. */protected final String model;+ /** The version of the model. */protected final Integer version;+private final String alias;private final String[] aliasesToAdd;private final String[] aliasesToRemove;diff --git a/clients/cli/src/main/java/org/apache/gravitino/cli/commands/UpdateModelVersionComment.java b/clients/cli/src/main/java/org/apache/gravitino/cli/commands/UpdateModelVersionComment.javaindex 5aed4b2f17..9c36a14cf1 100644--- a/clients/cli/src/main/java/org/apache/gravitino/cli/commands/UpdateModelVersionComment.java+++ b/clients/cli/src/main/java/org/apache/gravitino/cli/commands/UpdateModelVersionComment.java@@ -32,11 +32,17 @@ import org.apache.gravitino.model.ModelVersionChange;/** Update the comment of a model version. */public class UpdateModelVersionComment extends Command {+ /** The name of the metalake. */protected final String metalake;+ /** The name of the catalog. */protected final String catalog;+ /** The name of the schema. */protected final String schema;+ /** The name of the model. */protected final String model;+ /** The version of the model. */protected final Integer version;+private final String alias;private final String comment;diff --git a/clients/cli/src/main/java/org/apache/gravitino/cli/commands/UpdateModelVersionUri.java b/clients/cli/src/main/java/org/apache/gravitino/cli/commands/UpdateModelVersionUri.javaindex d4543159b1..2e5a00e01e 100644--- a/clients/cli/src/main/java/org/apache/gravitino/cli/commands/UpdateModelVersionUri.java+++ b/clients/cli/src/main/java/org/apache/gravitino/cli/commands/UpdateModelVersionUri.java@@ -32,11 +32,17 @@ import org.apache.gravitino.model.ModelVersionChange;/** Update the uri of a model version. */public class UpdateModelVersionUri extends Command {+ /** The metalake name. */protected final String metalake;+ /** The catalog name. */protected final String catalog;+ /** The schema name. */protected final String schema;+ /** The model name. */protected final String model;+ /** The version number. */protected final Integer version;+private final String alias;private final String uri;diff --git a/clients/cli/src/main/java/org/apache/gravitino/cli/commands/UpdateTableComment.java b/clients/cli/src/main/java/org/apache/gravitino/cli/commands/UpdateTableComment.javaindex 8983b40c06..2fa29cddf6 100644--- a/clients/cli/src/main/java/org/apache/gravitino/cli/commands/UpdateTableComment.java+++ b/clients/cli/src/main/java/org/apache/gravitino/cli/commands/UpdateTableComment.java@@ -32,10 +32,15 @@ import org.apache.gravitino.rel.TableChange;/** Update the comment of a table. */public class UpdateTableComment extends Command {+ /** The name of the metalake. */protected final String metalake;+ /** The name of the catalog. */protected final String catalog;+ /** The name of the schema. */protected final String schema;+ /** The name of the table. */protected final String table;+ /** The new comment for the table. */protected final String comment;/**diff --git a/clients/cli/src/main/java/org/apache/gravitino/cli/commands/UpdateTableName.java b/clients/cli/src/main/java/org/apache/gravitino/cli/commands/UpdateTableName.javaindex 0756e7124f..26aba4ad81 100644--- a/clients/cli/src/main/java/org/apache/gravitino/cli/commands/UpdateTableName.java+++ b/clients/cli/src/main/java/org/apache/gravitino/cli/commands/UpdateTableName.java@@ -32,10 +32,15 @@ import org.apache.gravitino.rel.TableChange;/** Update the name of a table. */public class UpdateTableName extends Command {+ /** The name of the metalake. */protected final String metalake;+ /** The name of the catalog. */protected final String catalog;+ /** The name of the schema. */protected final String schema;+ /** The name of the table. */protected final String table;+ /** The new table name. */protected final String name;/**diff --git a/clients/cli/src/main/java/org/apache/gravitino/cli/commands/UpdateTagComment.java b/clients/cli/src/main/java/org/apache/gravitino/cli/commands/UpdateTagComment.javaindex 3abc7f29c3..cb83e12b7e 100644--- a/clients/cli/src/main/java/org/apache/gravitino/cli/commands/UpdateTagComment.java+++ b/clients/cli/src/main/java/org/apache/gravitino/cli/commands/UpdateTagComment.java@@ -29,8 +29,11 @@ import org.apache.gravitino.tag.TagChange;/** Update the comment of a tag. */public class UpdateTagComment extends Command {+ /** The name of the metalake. */protected final String metalake;+ /** The name of the tag. */protected final String tag;+ /** New tag comment. */protected final String comment;/**diff --git a/clients/cli/src/main/java/org/apache/gravitino/cli/commands/UpdateTagName.java b/clients/cli/src/main/java/org/apache/gravitino/cli/commands/UpdateTagName.javaindex 1dc79b76e9..7a28c85695 100644--- a/clients/cli/src/main/java/org/apache/gravitino/cli/commands/UpdateTagName.java+++ b/clients/cli/src/main/java/org/apache/gravitino/cli/commands/UpdateTagName.java@@ -29,8 +29,11 @@ import org.apache.gravitino.tag.TagChange;/** Update the name of a tag. */public class UpdateTagName extends Command {+ /** The name of the metalake. */protected final String metalake;+ /** The name of the tag. */protected final String tag;+ /** The new tag name. */protected final String name;/**diff --git a/clients/cli/src/main/java/org/apache/gravitino/cli/commands/UpdateTopicComment.java b/clients/cli/src/main/java/org/apache/gravitino/cli/commands/UpdateTopicComment.javaindex 37121db4ac..001ce60e18 100644--- a/clients/cli/src/main/java/org/apache/gravitino/cli/commands/UpdateTopicComment.java+++ b/clients/cli/src/main/java/org/apache/gravitino/cli/commands/UpdateTopicComment.java@@ -32,10 +32,15 @@ import org.apache.gravitino.messaging.TopicChange;/** Update the comment of a topic. */public class UpdateTopicComment extends Command {+ /** The name of the metalake. */protected final String metalake;+ /** The name of the catalog. */protected final String catalog;+ /** The name of the schema. */protected final String schema;+ /** The name of the topic. */protected final String topic;+ /** The new comment for the topic. */protected final String comment;/**diff --git a/clients/cli/src/main/java/org/apache/gravitino/cli/commands/UserAudit.java b/clients/cli/src/main/java/org/apache/gravitino/cli/commands/UserAudit.javaindex 73b4f32e5f..572ba14167 100644--- a/clients/cli/src/main/java/org/apache/gravitino/cli/commands/UserAudit.java+++ b/clients/cli/src/main/java/org/apache/gravitino/cli/commands/UserAudit.java@@ -26,9 +26,12 @@ import org.apache.gravitino.client.GravitinoClient;import org.apache.gravitino.exceptions.NoSuchMetalakeException;import org.apache.gravitino.exceptions.NoSuchUserException;+/** Represents the "user audit" command. */public class UserAudit extends AuditCommand {+ /** The name of the metalake. */protected final String metalake;+ /** The name of the user. */protected final String user;/**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.javaindex ae7cb3a77d..359b20a496 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@@ -27,9 +27,12 @@ import org.apache.gravitino.client.GravitinoClient;import org.apache.gravitino.exceptions.NoSuchMetalakeException;import org.apache.gravitino.exceptions.NoSuchUserException;+/** Represents the "user-details" command. */public class UserDetails extends Command {+ /** The name of the metalake. */protected final String metalake;+ /** The name of the user. */protected final String user;/**diff --git a/clients/cli/src/main/java/org/apache/gravitino/cli/outputs/BaseOutputFormat.java b/clients/cli/src/main/java/org/apache/gravitino/cli/outputs/BaseOutputFormat.javaindex 889afe39d6..8d97d2084a 100644--- a/clients/cli/src/main/java/org/apache/gravitino/cli/outputs/BaseOutputFormat.java+++ b/clients/cli/src/main/java/org/apache/gravitino/cli/outputs/BaseOutputFormat.java@@ -32,6 +32,7 @@ import org.apache.gravitino.cli.CommandContext;* various output format implementations.*/public abstract class BaseOutputFormat<T> implements OutputFormat<T> {+ /** The command context. */protected CommandContext context;/**diff --git a/clients/cli/src/main/java/org/apache/gravitino/cli/outputs/Column.java b/clients/cli/src/main/java/org/apache/gravitino/cli/outputs/Column.javaindex 25c92a9d7b..4db43dd221 100644--- a/clients/cli/src/main/java/org/apache/gravitino/cli/outputs/Column.java+++ b/clients/cli/src/main/java/org/apache/gravitino/cli/outputs/Column.java@@ -28,7 +28,9 @@ import org.apache.gravitino.cli.CommandContext;* alignment, and content cells. Handles width calculations.*/public class Column {+ /** The character used to indicate that a cell has been truncated. */public static final char ELLIPSIS = '…';+private final String header;private final HorizontalAlign headerAlign;private final HorizontalAlign dataAlign;@@ -74,8 +76,11 @@ public class Column {* enum provides options for standard left-to-right text positioning.*/public enum HorizontalAlign {+ /** Aligns text to the left. */LEFT,+ /** Aligns text to the center. */CENTER,+ /** Aligns text to the right. */RIGHT}diff --git a/clients/cli/src/main/java/org/apache/gravitino/cli/outputs/LineUtil.java b/clients/cli/src/main/java/org/apache/gravitino/cli/outputs/LineUtil.javaindex 95052f18d2..ddaf864e0b 100644--- a/clients/cli/src/main/java/org/apache/gravitino/cli/outputs/LineUtil.java+++ b/clients/cli/src/main/java/org/apache/gravitino/cli/outputs/LineUtil.java@@ -28,15 +28,20 @@ import org.apache.gravitino.rel.expressions.literals.Literal;import org.apache.gravitino.rel.types.Type;import org.apache.gravitino.tag.Tag;+/** Utility class for handling line-based output. */public class LineUtil {+ /** Represents an empty string. */+ public static final String EMPTY_DEFAULT_VALUE = "";+ /** Represents a null value. */+ public static final String NULL_DEFAULT_VALUE = "N/A";+ /** Represents an empty string for string type columns. */+ public static final String EMPTY_STRING_TYPE_DEFAULT_VALUE = "''";+// This expression is primarily used to match characters that have a display width of// 2, such as characters from Korean, Chineseprivate static final Pattern FULL_WIDTH_PATTERN =Pattern.compile("[\u1100-\u115F\u2E80-\uA4CF\uAC00-\uD7A3\uF900-\uFAFF\uFE10-\uFE19\uFE30-\uFE6F\uFF00-\uFF60\uFFE0-\uFFE6]");- public static final String EMPTY_DEFAULT_VALUE = "";- public static final String NULL_DEFAULT_VALUE = "N/A";- public static final String EMPTY_STRING_TYPE_DEFAULT_VALUE = "''";/*** Get the display width of a string.diff --git a/clients/cli/src/main/java/org/apache/gravitino/cli/outputs/OutputConstant.java b/clients/cli/src/main/java/org/apache/gravitino/cli/outputs/OutputConstant.javaindex 756984485e..b8b660ea79 100644--- a/clients/cli/src/main/java/org/apache/gravitino/cli/outputs/OutputConstant.java+++ b/clients/cli/src/main/java/org/apache/gravitino/cli/outputs/OutputConstant.java@@ -21,39 +21,60 @@ package org.apache.gravitino.cli.outputs;import com.google.common.collect.ImmutableList;+/** This class contains constants used for drawing borders and other output formatting. */public class OutputConstant {+ /** Basic ASCII characters for drawing borders. */public static final ImmutableList<Character> BASIC_ASCII =ImmutableList.of('+', '-', '+', '+', '|', '|', '|', '+', '-', '+', '+', '|', '|', '|', '+', '-', '+', '+','+', '-', '+', '+', '|', '|', '|', '+', '-', '+', '+');// ===== Table Upper Border Indices =====+ /** Index of the left border of the table. */public static final int TABLE_UPPER_BORDER_LEFT_IDX = 0;+ /** Index of the middle border of the table. */public static final int TABLE_UPPER_BORDER_MIDDLE_IDX = 1;+ /** Index of the column separator of the table. */public static final int TABLE_UPPER_BORDER_COLUMN_SEPARATOR_IDX = 2;+ /** Index of the right border of the table. */public static final int TABLE_UPPER_BORDER_RIGHT_IDX = 3;// ===== Data Line Indices =====+ /** Index of the left border of the data line. */public static final int DATA_LINE_LEFT_IDX = 4;+ /** Index of the middle border of the data line. */public static final int DATA_LINE_COLUMN_SEPARATOR_IDX = 5;+ /** Index of the right border of the data line. */public static final int DATA_LINE_RIGHT_IDX = 6;// ===== Data Row Border Indices =====+ /** Index of the left border of the data row. */public static final int DATA_ROW_BORDER_LEFT_IDX = 14;+ /** Index of the middle border of the data row. */public static final int DATA_ROW_BORDER_MIDDLE_IDX = 15;+ /** Index of the column separator of the data row. */public static final int DATA_ROW_BORDER_COLUMN_SEPARATOR_IDX = 16;+ /** Index of the right border of the data row. */public static final int DATA_ROW_BORDER_RIGHT_IDX = 17;// ===== Table Bottom Border Indices =====+ /** Index of the left border of the table. */public static final int TABLE_BOTTOM_BORDER_LEFT_IDX = 25;+ /** Index of the middle border of the table. */public static final int TABLE_BOTTOM_BORDER_MIDDLE_IDX = 26;+ /** Index of the column separator of the table. */public static final int TABLE_BOTTOM_BORDER_COLUMN_SEPARATOR_IDX = 27;+ /** Index of the right border of the table. */public static final int TABLE_BOTTOM_BORDER_RIGHT_IDX = 28;// ===== Header Bottom Border Indices =====+ /** Index of the left border of the header. */public static final int HEADER_BOTTOM_BORDER_LEFT_IDX = 18;+ /** Index of the middle border of the header. */public static final int HEADER_BOTTOM_BORDER_MIDDLE_IDX = 19;+ /** Index of the column separator of the header. */public static final int HEADER_BOTTOM_BORDER_COLUMN_SEPARATOR_IDX = 20;+ /** Index of the right border of the header. */public static final int HEADER_BOTTOM_BORDER_RIGHT_IDX = 21;private OutputConstant() {diff --git a/clients/cli/src/main/java/org/apache/gravitino/cli/outputs/TableFormat.java b/clients/cli/src/main/java/org/apache/gravitino/cli/outputs/TableFormat.javaindex bb5f5366ab..6ac3ff575a 100644--- a/clients/cli/src/main/java/org/apache/gravitino/cli/outputs/TableFormat.java+++ b/clients/cli/src/main/java/org/apache/gravitino/cli/outputs/TableFormat.java@@ -71,6 +71,7 @@ import org.apache.gravitino.tag.Tag;* numbers - Data limiting and sorting*/public abstract class TableFormat<T> extends BaseOutputFormat<T> {+ /** Default padding size for column alignment. */public static final int PADDING = 1;/**