ACCUMULO-802 Fixed a problem with RandomWalk's CloneTable, forgot to have it create a namespace. Randomwalk doesn't fail as fast, but still doesn't run correctly
Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/e56fc7e0 Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/e56fc7e0 Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/e56fc7e0 Branch: refs/heads/ACCUMULO-802 Commit: e56fc7e020f0423cf4fa0889728a98bcce784413 Parents: f287f3f Author: Sean Hickey <[email protected]> Authored: Wed Jul 10 10:53:34 2013 -0400 Committer: Christopher Tubbs <[email protected]> Committed: Thu Oct 31 21:11:25 2013 -0400 ---------------------------------------------------------------------- .../apache/accumulo/test/randomwalk/concurrent/CloneTable.java | 5 +++++ 1 file changed, 5 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/accumulo/blob/e56fc7e0/test/src/main/java/org/apache/accumulo/test/randomwalk/concurrent/CloneTable.java ---------------------------------------------------------------------- diff --git a/test/src/main/java/org/apache/accumulo/test/randomwalk/concurrent/CloneTable.java b/test/src/main/java/org/apache/accumulo/test/randomwalk/concurrent/CloneTable.java index 65d3aed..fdbbc4e 100644 --- a/test/src/main/java/org/apache/accumulo/test/randomwalk/concurrent/CloneTable.java +++ b/test/src/main/java/org/apache/accumulo/test/randomwalk/concurrent/CloneTable.java @@ -25,6 +25,7 @@ import java.util.Random; import org.apache.accumulo.core.client.Connector; import org.apache.accumulo.core.client.TableExistsException; import org.apache.accumulo.core.client.TableNotFoundException; +import org.apache.accumulo.core.client.impl.Tables; import org.apache.accumulo.test.randomwalk.State; import org.apache.accumulo.test.randomwalk.Test; @@ -44,6 +45,10 @@ public class CloneTable extends Test { boolean flush = rand.nextBoolean(); try { + String n = Tables.extractNamespace(newTableName); + if (!conn.tableNamespaceOperations().exists(n)) { + conn.tableNamespaceOperations().create(n); + } log.debug("Cloning table " + srcTableName + " " + newTableName + " " + flush); conn.tableOperations().clone(srcTableName, newTableName, flush, new HashMap<String,String>(), new HashSet<String>()); } catch (TableExistsException e) {
