You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@accumulo.apache.org by el...@apache.org on 2014/01/03 21:36:16 UTC
git commit: ACCUMULO-2090 Add a slightly better exception catching on
randomwalk RenameTable
Updated Branches:
refs/heads/1.6.0-SNAPSHOT 4c2652b23 -> 29bdceb4e
ACCUMULO-2090 Add a slightly better exception catching on randomwalk RenameTable
We know a few things when we catch this exception, but we can't definitely
make assertions about what was correct/incorrect because the namespaces could
be created or deleted while we're running this test. Best we can do is properly log.
Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo
Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/29bdceb4
Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/29bdceb4
Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/29bdceb4
Branch: refs/heads/1.6.0-SNAPSHOT
Commit: 29bdceb4e601ba6ebaaa80e93ef676b4d28b2699
Parents: 4c2652b
Author: Josh Elser <el...@apache.org>
Authored: Fri Jan 3 14:32:36 2014 -0500
Committer: Josh Elser <el...@apache.org>
Committed: Fri Jan 3 15:36:04 2014 -0500
----------------------------------------------------------------------
.../test/randomwalk/concurrent/RenameTable.java | 12 ++++++++++++
1 file changed, 12 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/accumulo/blob/29bdceb4/test/src/main/java/org/apache/accumulo/test/randomwalk/concurrent/RenameTable.java
----------------------------------------------------------------------
diff --git a/test/src/main/java/org/apache/accumulo/test/randomwalk/concurrent/RenameTable.java b/test/src/main/java/org/apache/accumulo/test/randomwalk/concurrent/RenameTable.java
index 6c7516e..d9a12fb 100644
--- a/test/src/main/java/org/apache/accumulo/test/randomwalk/concurrent/RenameTable.java
+++ b/test/src/main/java/org/apache/accumulo/test/randomwalk/concurrent/RenameTable.java
@@ -22,6 +22,7 @@ import java.util.Random;
import org.apache.accumulo.core.client.AccumuloException;
import org.apache.accumulo.core.client.Connector;
+import org.apache.accumulo.core.client.NamespaceNotFoundException;
import org.apache.accumulo.core.client.TableExistsException;
import org.apache.accumulo.core.client.TableNotFoundException;
import org.apache.accumulo.test.randomwalk.State;
@@ -59,6 +60,17 @@ public class RenameTable extends Test {
} catch (TableExistsException e) {
log.debug("Rename " + srcTableName + " failed, " + newTableName + " exists");
} catch (TableNotFoundException e) {
+ Throwable cause = e.getCause();
+ if (null != cause) {
+ // Rename has to have failed on the destination namespace, because the source namespace
+ // couldn't be deleted with our table in it
+ if (cause.getClass().isAssignableFrom(NamespaceNotFoundException.class)) {
+ log.debug("Rename failed because new namespace doesn't exist: " + newNamespace, cause);
+ // Avoid the final src/dest namespace check
+ return;
+ }
+ }
+
log.debug("Rename " + srcTableName + " failed, doesnt exist");
} catch (IllegalArgumentException e) {
log.debug("Rename: " + e.toString());