EdColeman commented on code in PR #3562:
URL: https://github.com/apache/accumulo/pull/3562#discussion_r1256302304


##########
shell/src/main/java/org/apache/accumulo/shell/commands/CreateNamespaceCommand.java:
##########
@@ -37,33 +37,42 @@
 
 public class CreateNamespaceCommand extends Command {
   private Option createNamespaceOptCopyConfig;
+  private Option createNamespaceOptCopyProperties;
 
   @Override
   public int execute(final String fullCommand, final CommandLine cl, final 
Shell shellState)
       throws AccumuloException, AccumuloSecurityException, 
TableExistsException,
       TableNotFoundException, IOException, ClassNotFoundException, 
NamespaceExistsException,
       NamespaceNotFoundException {
 
-    if (createNamespaceOptCopyConfig == null) {
-      getOptions();
-    }
+    getOptions();
 
     String namespace = cl.getArgs()[0];
 
     shellState.getAccumuloClient().namespaceOperations().create(namespace);
 
-    // Copy options if flag was set
-    Map<String,String> configuration = null;
+    Map<String,String> propsToSet = null;
+
+    // Copy configuration options if flag was set
     if (cl.hasOption(createNamespaceOptCopyConfig.getOpt())) {
-      String copy = cl.getOptionValue(createNamespaceOptCopyConfig.getOpt());
+      String srcNs = cl.getOptionValue(createNamespaceOptCopyConfig.getOpt());
       if 
(shellState.getAccumuloClient().namespaceOperations().exists(namespace)) {
-        configuration = 
shellState.getAccumuloClient().namespaceOperations().getConfiguration(copy);
+        propsToSet = 
shellState.getAccumuloClient().namespaceOperations().getConfiguration(srcNs);
       }
     }
-    if (configuration != null) {
-      final Map<String,String> config = configuration;
+
+    if (cl.hasOption(createNamespaceOptCopyProperties.getOpt())) {
+      String srcNs = 
cl.getOptionValue(createNamespaceOptCopyProperties.getOpt());
+      if 
(shellState.getAccumuloClient().namespaceOperations().exists(namespace)) {

Review Comment:
   Addressed with c05206a036



-- 
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]

Reply via email to