accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ctubb...@apache.org
Subject [33/54] git commit: ACCUMULO-802 Cleanup from previous rebases
Date Fri, 01 Nov 2013 02:00:34 GMT
ACCUMULO-802 Cleanup from previous rebases


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

Branch: refs/heads/ACCUMULO-802
Commit: 9134cc33731525260c848d7cefd9863259581a7b
Parents: 88cbefb
Author: Christopher Tubbs <ctubbsii@apache.org>
Authored: Tue Aug 6 20:46:02 2013 -0400
Committer: Christopher Tubbs <ctubbsii@apache.org>
Committed: Thu Oct 31 21:32:14 2013 -0400

----------------------------------------------------------------------
 .../core/client/admin/TableNamespaceOperationsHelper.java    | 2 +-
 .../core/client/admin/TableNamespaceOperationsImpl.java      | 2 +-
 .../accumulo/core/client/admin/TableOperationsImpl.java      | 4 +---
 .../src/main/java/org/apache/accumulo/master/Master.java     | 4 ++--
 .../test/java/org/apache/accumulo/test/ShellServerIT.java    | 8 ++++----
 .../java/org/apache/accumulo/test/TableNamespacesIT.java     | 4 ++--
 6 files changed, 11 insertions(+), 13 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/accumulo/blob/9134cc33/core/src/main/java/org/apache/accumulo/core/client/admin/TableNamespaceOperationsHelper.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/client/admin/TableNamespaceOperationsHelper.java
b/core/src/main/java/org/apache/accumulo/core/client/admin/TableNamespaceOperationsHelper.java
index c60c9ba..7ba1497 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/admin/TableNamespaceOperationsHelper.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/admin/TableNamespaceOperationsHelper.java
@@ -175,7 +175,7 @@ public abstract class TableNamespaceOperationsHelper implements TableNamespaceOp
     while (constraintNumbers.contains(i))
       i++;
     if (constraintClasses.containsKey(constraintClassName))
-      throw new AccumuloException("Constraint " + constraintClassName + " already exists
for table " + tableNamespace + " with number "
+      throw new AccumuloException("Constraint " + constraintClassName + " already exists
for table namespace " + tableNamespace + " with number "
           + constraintClasses.get(constraintClassName));
     this.setProperty(tableNamespace, Property.TABLE_CONSTRAINT_PREFIX.toString() + i, constraintClassName);
     return i;

http://git-wip-us.apache.org/repos/asf/accumulo/blob/9134cc33/core/src/main/java/org/apache/accumulo/core/client/admin/TableNamespaceOperationsImpl.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/client/admin/TableNamespaceOperationsImpl.java
b/core/src/main/java/org/apache/accumulo/core/client/admin/TableNamespaceOperationsImpl.java
index d4a1d1c..c35319d 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/admin/TableNamespaceOperationsImpl.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/admin/TableNamespaceOperationsImpl.java
@@ -401,7 +401,7 @@ public class TableNamespaceOperationsImpl extends TableNamespaceOperationsHelper
     Map<String,String> opts = new HashMap<String,String>();
     opts.putAll(propertiesToSet);
     for (String prop : propertiesToExclude)
-      opts.put(prop, null);
+      opts.put(prop, "");
     doTableNamespaceOperation(TableOperation.CLONE, args, opts);
 
     for (String tableId : TableNamespaces.getTableIds(instance, namespaceId)) {

http://git-wip-us.apache.org/repos/asf/accumulo/blob/9134cc33/core/src/main/java/org/apache/accumulo/core/client/admin/TableOperationsImpl.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/client/admin/TableOperationsImpl.java
b/core/src/main/java/org/apache/accumulo/core/client/admin/TableOperationsImpl.java
index ad2cba9..2453615 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/admin/TableOperationsImpl.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/admin/TableOperationsImpl.java
@@ -702,8 +702,7 @@ public class TableOperationsImpl extends TableOperationsHelper {
     if (propertiesToSet == null)
       propertiesToSet = Collections.emptyMap();
 
-    // TODO ACCUMULO-1565 needs to be fixed before the commented-out code below will work.
-    HashSet<String> excludeProps = new HashSet<String>();// getUniqueNamespaceProperties(namespace,
srcTableName);
+    HashSet<String> excludeProps = getUniqueNamespaceProperties(namespace, srcTableName);
     for (String p : propertiesToExclude) {
       excludeProps.add(p);
     }
@@ -727,7 +726,6 @@ public class TableOperationsImpl extends TableOperationsHelper {
   }
 
   // get the properties that are only in the table namespace so that we can exclude them
when copying table properties
-  // TODO ACCUMULO-1565 needs fixed first
   private HashSet<String> getUniqueNamespaceProperties(String namespace, String table)
throws TableNotFoundException, AccumuloException {
     HashSet<String> props = new HashSet<String>();
     try {

http://git-wip-us.apache.org/repos/asf/accumulo/blob/9134cc33/server/master/src/main/java/org/apache/accumulo/master/Master.java
----------------------------------------------------------------------
diff --git a/server/master/src/main/java/org/apache/accumulo/master/Master.java b/server/master/src/main/java/org/apache/accumulo/master/Master.java
index e4c078f..563486e 100644
--- a/server/master/src/main/java/org/apache/accumulo/master/Master.java
+++ b/server/master/src/main/java/org/apache/accumulo/master/Master.java
@@ -43,9 +43,9 @@ import org.apache.accumulo.core.client.IteratorSetting;
 import org.apache.accumulo.core.client.RowIterator;
 import org.apache.accumulo.core.client.Scanner;
 import org.apache.accumulo.core.client.TableNotFoundException;
-import org.apache.accumulo.core.client.admin.TableOperationsImpl;
 import org.apache.accumulo.core.client.admin.TimeType;
 import org.apache.accumulo.core.client.impl.TableNamespaces;
+import org.apache.accumulo.core.client.admin.TableOperationsImpl;
 import org.apache.accumulo.core.client.impl.Tables;
 import org.apache.accumulo.core.client.impl.ThriftTransportPool;
 import org.apache.accumulo.core.client.impl.thrift.SecurityErrorCode;
@@ -1161,7 +1161,7 @@ public class Master implements LiveTServerSet.Listener, TableObserver,
CurrentSt
           Set<String> propertiesToExclude = new HashSet<String>();
 
           for (Entry<String,String> entry : options.entrySet()) {
-            if (entry.getValue() == null) {
+            if (entry.getValue() == null || entry.getValue().isEmpty()) {
               propertiesToExclude.add(entry.getKey());
               continue;
             }

http://git-wip-us.apache.org/repos/asf/accumulo/blob/9134cc33/test/src/test/java/org/apache/accumulo/test/ShellServerIT.java
----------------------------------------------------------------------
diff --git a/test/src/test/java/org/apache/accumulo/test/ShellServerIT.java b/test/src/test/java/org/apache/accumulo/test/ShellServerIT.java
index e2a9476..1a3a0a9 100644
--- a/test/src/test/java/org/apache/accumulo/test/ShellServerIT.java
+++ b/test/src/test/java/org/apache/accumulo/test/ShellServerIT.java
@@ -844,10 +844,10 @@ public class ShellServerIT extends SimpleMacIT {
     exec("y");
     exec("namespaces", true, "thing2", true);
     
-    /*
-     * doesn't work yet, waiting on ACCUMULO-1565 exec("clonenamespace thing2 testers -e
table.file.max", true); exec("namespaces", true, "testers", true);
-     * exec("tables", true, "testers.thingy", true); exec("clonenamespace thing2 testers2
-s table.file.max=42", true);
-     */
+    exec("clonenamespace thing2 testers -e table.file.max", true);
+    exec("namespaces", true, "testers", true);
+    exec("tables", true, "testers.thingy", true);
+    exec("clonenamespace thing2 testers2 -s table.file.max=42", true);
     
     exec("du -tn thing2", true, "thing2.thingy", true);
     

http://git-wip-us.apache.org/repos/asf/accumulo/blob/9134cc33/test/src/test/java/org/apache/accumulo/test/TableNamespacesIT.java
----------------------------------------------------------------------
diff --git a/test/src/test/java/org/apache/accumulo/test/TableNamespacesIT.java b/test/src/test/java/org/apache/accumulo/test/TableNamespacesIT.java
index 7ee186e..584991e 100644
--- a/test/src/test/java/org/apache/accumulo/test/TableNamespacesIT.java
+++ b/test/src/test/java/org/apache/accumulo/test/TableNamespacesIT.java
@@ -363,7 +363,7 @@ public class TableNamespacesIT {
    * This tests adding iterators to a namespace, listing them, and removing them as well
as adding and removing constraints
    */
   @Test
-  public void testNamespaceIterators() throws Exception {
+  public void testNamespaceIteratorsAndConstraints() throws Exception {
     Connector c = accumulo.getConnector("root", secret);
     
     String namespace = "iterator";
@@ -399,11 +399,11 @@ public class TableNamespacesIT {
     try {
       bw.addMutation(m);
       bw.flush();
+      bw.close();
       fail();
     } catch (MutationsRejectedException e) {
       // supposed to be thrown
     }
-    bw.close();
     
     int num = c.tableNamespaceOperations().listConstraints(namespace).get(NumericValueConstraint.class.getName());
     c.tableNamespaceOperations().removeConstraint(namespace, num);


Mime
View raw message