kevinrr888 commented on code in PR #6012:
URL: https://github.com/apache/accumulo/pull/6012#discussion_r2607823261
##########
shell/src/main/java/org/apache/accumulo/shell/commands/CreateTableCommand.java:
##########
@@ -152,17 +168,29 @@ public int execute(final String fullCommand, final
CommandLine cl, final Shell s
}
// Copy configuration options if flag was set
- Map<String,String> srcTableConfig = null;
- if (cl.hasOption(createTableOptCopyConfig.getOpt())) {
- String srcTable = cl.getOptionValue(createTableOptCopyConfig.getOpt());
- if (cl.hasOption(createTableOptExcludeParentProps.getLongOpt())) {
+ Map<String,String> srcTableConfig;
+ var hasCopyConfigOpt = cl.hasOption(createTableOptCopyConfig);
+ var hasCopyPropsOpt = cl.hasOption(createTableOptCopyProps);
+ if (hasCopyConfigOpt || hasCopyPropsOpt) {
+ if (hasCopyConfigOpt) {
+ String srcTable = cl.getOptionValue(createTableOptCopyConfig.getOpt());
+ if (cl.hasOption(createTableOptExcludeParentProps.getLongOpt())) {
+ Shell.log.warn(
+ "{} is deprecated and will be removed in a future version. Use
{} instead.",
+ createTableOptExcludeParentProps.getLongOpt(),
createTableOptCopyProps.getLongOpt());
+ // copy properties, excludes parent properties in configuration
+ srcTableConfig =
+
shellState.getAccumuloClient().tableOperations().getTableProperties(srcTable);
+ } else {
+ // copy configuration (include parent properties)
+ srcTableConfig =
Review Comment:
Deprecated in 34f7897acb92d5c3885c073fd0be63a99afa0284
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]