accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vi...@apache.org
Subject [4/8] git commit: ACCUMULO-2260 removing table copy flag from createnamespace
Date Tue, 28 Jan 2014 22:57:21 GMT
ACCUMULO-2260 removing table copy flag from createnamespace


Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo
Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/07d7ecec
Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/07d7ecec
Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/07d7ecec

Branch: refs/heads/master
Commit: 07d7ececf31cf123029136f028bce5eb776a19cb
Parents: f382cd8
Author: John Vines <vines@apache.org>
Authored: Tue Jan 28 17:10:02 2014 -0500
Committer: John Vines <vines@apache.org>
Committed: Tue Jan 28 17:10:02 2014 -0500

----------------------------------------------------------------------
 .../util/shell/commands/CreateNamespaceCommand.java  | 15 +++------------
 1 file changed, 3 insertions(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/accumulo/blob/07d7ecec/core/src/main/java/org/apache/accumulo/core/util/shell/commands/CreateNamespaceCommand.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/util/shell/commands/CreateNamespaceCommand.java
b/core/src/main/java/org/apache/accumulo/core/util/shell/commands/CreateNamespaceCommand.java
index d59f2ef..a9f3deb 100644
--- a/core/src/main/java/org/apache/accumulo/core/util/shell/commands/CreateNamespaceCommand.java
+++ b/core/src/main/java/org/apache/accumulo/core/util/shell/commands/CreateNamespaceCommand.java
@@ -34,13 +34,13 @@ import org.apache.commons.cli.OptionGroup;
 import org.apache.commons.cli.Options;
 
 public class CreateNamespaceCommand extends Command {
-  private Option createTableOptCopyConfig, createNamespaceOptCopyConfig;
+  private Option createNamespaceOptCopyConfig;
 
   @Override
   public int execute(final String fullCommand, final CommandLine cl, final Shell shellState)
throws AccumuloException, AccumuloSecurityException,
       TableExistsException, TableNotFoundException, IOException, ClassNotFoundException,
NamespaceExistsException, NamespaceNotFoundException {
 
-    if (createTableOptCopyConfig == null) {
+    if (createNamespaceOptCopyConfig == null) {
       getOptions();
     }
 
@@ -55,12 +55,7 @@ public class CreateNamespaceCommand extends Command {
       if (shellState.getConnector().namespaceOperations().exists(namespace)) {
         configuration = shellState.getConnector().namespaceOperations().getProperties(copy);
       }
-    } else if (cl.hasOption(createTableOptCopyConfig.getOpt())) {
-      String copy = cl.getOptionValue(createTableOptCopyConfig.getOpt());
-      if (shellState.getConnector().namespaceOperations().exists(namespace)) {
-        configuration = shellState.getConnector().tableOperations().getProperties(copy);
-      }
-    }
+    } 
     if (configuration != null) {
       for (Entry<String,String> entry : configuration) {
         if (Property.isValidTablePropertyKey(entry.getKey())) {
@@ -89,11 +84,7 @@ public class CreateNamespaceCommand extends Command {
     createNamespaceOptCopyConfig = new Option("cc", "copy-config", true, "namespace to copy
configuration from");
     createNamespaceOptCopyConfig.setArgName("namespace");
 
-    createTableOptCopyConfig = new Option("ctc", "copy-table-config", true, "table to copy
configuration from");
-    createTableOptCopyConfig.setArgName("tableName");
-
     OptionGroup ogp = new OptionGroup();
-    ogp.addOption(createTableOptCopyConfig);
     ogp.addOption(createNamespaceOptCopyConfig);
 
     o.addOptionGroup(ogp);


Mime
View raw message