You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@accumulo.apache.org by vi...@apache.org on 2013/12/17 00:58:19 UTC

[1/2] git commit: ACCUMULO-2035 ACCUMULO-2025 I accidently made limitVersion always true instead of never true. Now proper.

Updated Branches:
  refs/heads/master 02add1ddd -> c761b59e0


ACCUMULO-2035 ACCUMULO-2025 I accidently made limitVersion always true instead of never true. Now proper.

Also split apart the Iterator and Constraints tests in NamespacesIT


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

Branch: refs/heads/master
Commit: ae20660d8202cf511c5dbd07b164634fa6f32126
Parents: 39b22d3
Author: John Vines <vi...@apache.org>
Authored: Mon Dec 16 18:56:40 2013 -0500
Committer: John Vines <vi...@apache.org>
Committed: Mon Dec 16 18:56:40 2013 -0500

----------------------------------------------------------------------
 .../core/client/admin/TableOperationsImpl.java  |  6 ++++-
 .../org/apache/accumulo/test/NamespacesIT.java  | 25 ++++++++++++++++----
 2 files changed, 26 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/accumulo/blob/ae20660d/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 2819031..26192ef 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
@@ -218,7 +218,11 @@ public class TableOperationsImpl extends TableOperationsHelper {
 
     List<ByteBuffer> args = Arrays.asList(ByteBuffer.wrap(tableName.getBytes()), ByteBuffer.wrap(timeType.name().getBytes()));
 
-    Map<String,String> opts = IteratorUtil.generateInitialTableProperties(limitVersion);
+    Map<String,String> opts;
+    if (limitVersion)
+      opts = IteratorUtil.generateInitialTableProperties(limitVersion);
+    else
+      opts = Collections.emptyMap();
 
     try {
       doTableOperation(TableOperation.CREATE, args, opts);

http://git-wip-us.apache.org/repos/asf/accumulo/blob/ae20660d/test/src/test/java/org/apache/accumulo/test/NamespacesIT.java
----------------------------------------------------------------------
diff --git a/test/src/test/java/org/apache/accumulo/test/NamespacesIT.java b/test/src/test/java/org/apache/accumulo/test/NamespacesIT.java
index f38c944..d00334a 100644
--- a/test/src/test/java/org/apache/accumulo/test/NamespacesIT.java
+++ b/test/src/test/java/org/apache/accumulo/test/NamespacesIT.java
@@ -279,10 +279,10 @@ public class NamespacesIT extends SimpleMacIT {
   }
 
   /**
-   * This tests adding iterators to a namespace, listing them, and removing them as well as adding and removing constraints
+   * This tests adding iterators to a namespace, listing them, and removing them
    */
   @Test
-  public void testNamespaceIteratorsAndConstraints() throws Exception {
+  public void testNamespaceIterators() throws Exception {
     Connector c = getConnector();
 
     String namespace = "iterator";
@@ -307,15 +307,32 @@ public class NamespacesIT extends SimpleMacIT {
     assertTrue(!s.iterator().hasNext());
 
     assertTrue(c.namespaceOperations().listIterators(namespace).containsKey(iter));
-    c.namespaceOperations().removeIterator(namespace, iter, EnumSet.copyOf(scope));
+  }
+
+  /**
+   * This tests adding iterators to a namespace, listing them, and removing them as well as adding and removing constraints
+   */
+  @Test
+  public void testNamespaceConstraints() throws Exception {
+    Connector c = getConnector();
+
+    String namespace = "iterator";
+    String tableName = namespace + ".table";
+    String iter = "thing";
+
+    c.namespaceOperations().create(namespace);
+    c.tableOperations().create(tableName, false);
+
+    c.namespaceOperations().removeIterator(namespace, iter, EnumSet.of(IteratorScope.scan));
 
     c.namespaceOperations().addConstraint(namespace, NumericValueConstraint.class.getName());
     // doesn't take effect immediately, needs time to propagate
     UtilWaitThread.sleep(250);
 
-    m = new Mutation("rowy");
+    Mutation m = new Mutation("rowy");
     m.put("a", "b", new Value("abcde".getBytes(Constants.UTF8)));
     try {
+      BatchWriter bw = c.createBatchWriter(tableName, new BatchWriterConfig());
       bw.addMutation(m);
       bw.flush();
       bw.close();


[2/2] git commit: Merge branch '1.6.0-SNAPSHOT'

Posted by vi...@apache.org.
Merge branch '1.6.0-SNAPSHOT'


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

Branch: refs/heads/master
Commit: c761b59e0eec079225a6a6bbad7a4387db07c5a6
Parents: 02add1d ae20660
Author: John Vines <vi...@apache.org>
Authored: Mon Dec 16 18:58:13 2013 -0500
Committer: John Vines <vi...@apache.org>
Committed: Mon Dec 16 18:58:13 2013 -0500

----------------------------------------------------------------------
 .../core/client/admin/TableOperationsImpl.java  |  6 ++++-
 .../org/apache/accumulo/test/NamespacesIT.java  | 25 ++++++++++++++++----
 2 files changed, 26 insertions(+), 5 deletions(-)
----------------------------------------------------------------------