You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@accumulo.apache.org by ct...@apache.org on 2017/06/13 03:14:07 UTC
[2/6] accumulo git commit: ACCUMULO-4619 Fix addSplits exception
regression
ACCUMULO-4619 Fix addSplits exception regression
Fix regression observed by LargeSplitRowIT. Restored proper
AccumuloServerException exception type when a server-side error occurs
while client is waiting on split points to be added.
Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo
Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/94bb593b
Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/94bb593b
Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/94bb593b
Branch: refs/heads/1.8
Commit: 94bb593ba1dcf545cfc2cf39f8ef8b360b064dd2
Parents: de83e61
Author: Christopher Tubbs <ct...@apache.org>
Authored: Mon Jun 12 22:34:00 2017 -0400
Committer: Christopher Tubbs <ct...@apache.org>
Committed: Mon Jun 12 22:34:00 2017 -0400
----------------------------------------------------------------------
.../accumulo/core/client/impl/AccumuloServerException.java | 4 ++++
.../apache/accumulo/core/client/impl/TableOperationsImpl.java | 7 +++++--
2 files changed, 9 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/accumulo/blob/94bb593b/core/src/main/java/org/apache/accumulo/core/client/impl/AccumuloServerException.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/client/impl/AccumuloServerException.java b/core/src/main/java/org/apache/accumulo/core/client/impl/AccumuloServerException.java
index c689c91..ad9fff7 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/impl/AccumuloServerException.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/impl/AccumuloServerException.java
@@ -28,6 +28,10 @@ public class AccumuloServerException extends AccumuloException {
private static final long serialVersionUID = 1L;
private String server;
+ AccumuloServerException(final AccumuloServerException cause) {
+ super("Error on server " + cause.getServer(), cause);
+ }
+
public AccumuloServerException(final String server, final TApplicationException tae) {
super("Error on server " + server, tae);
this.setServer(server);
http://git-wip-us.apache.org/repos/asf/accumulo/blob/94bb593b/core/src/main/java/org/apache/accumulo/core/client/impl/TableOperationsImpl.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/client/impl/TableOperationsImpl.java b/core/src/main/java/org/apache/accumulo/core/client/impl/TableOperationsImpl.java
index 42afb9d..63b44d5 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/impl/TableOperationsImpl.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/impl/TableOperationsImpl.java
@@ -398,10 +398,13 @@ public class TableOperationsImpl extends TableOperationsHelper {
// base == background accumulo security exception
AccumuloSecurityException base = (AccumuloSecurityException) excep;
throw new AccumuloSecurityException(base.getUser(), base.asThriftException().getCode(), base.getTableInfo(), excep);
- } else if (excep instanceof Error)
+ } else if (excep instanceof AccumuloServerException) {
+ throw new AccumuloServerException((AccumuloServerException) excep);
+ } else if (excep instanceof Error) {
throw new Error(excep);
- else
+ } else {
throw new AccumuloException(excep);
+ }
}
}
} catch (InterruptedException e) {