You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@accumulo.apache.org by mm...@apache.org on 2018/03/01 15:32:47 UTC
[accumulo] branch 1.7 updated: Add TableOfflineException to
TableOps.addSplits (#393)
This is an automated email from the ASF dual-hosted git repository.
mmiller pushed a commit to branch 1.7
in repository https://gitbox.apache.org/repos/asf/accumulo.git
The following commit(s) were added to refs/heads/1.7 by this push:
new 93a1a1f Add TableOfflineException to TableOps.addSplits (#393)
93a1a1f is described below
commit 93a1a1f4ac881a6701567cee96dcaf6b831f1185
Author: Mike Miller <mm...@apache.org>
AuthorDate: Thu Mar 1 10:32:45 2018 -0500
Add TableOfflineException to TableOps.addSplits (#393)
Also revert commit bcd2dc51 which was hiding this error
---
.../org/apache/accumulo/core/client/impl/TableOperationsImpl.java | 3 +++
.../org/apache/accumulo/test/randomwalk/concurrent/AddSplits.java | 7 -------
2 files changed, 3 insertions(+), 7 deletions(-)
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 0c3e0e6..3015b1d 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
@@ -394,6 +394,9 @@ public class TableOperationsImpl extends TableOperationsHelper {
if (excep instanceof TableNotFoundException) {
TableNotFoundException tnfe = (TableNotFoundException) excep;
throw new TableNotFoundException(tableId, tableName, "Table not found by background thread", tnfe);
+ } else if (excep instanceof TableOfflineException) {
+ log.debug("TableOfflineException occurred in background thread. Throwing new exception", excep);
+ throw new TableOfflineException(context.getInstance(), tableId);
} else if (excep instanceof AccumuloSecurityException) {
// base == background accumulo security exception
AccumuloSecurityException base = (AccumuloSecurityException) excep;
diff --git a/test/src/main/java/org/apache/accumulo/test/randomwalk/concurrent/AddSplits.java b/test/src/main/java/org/apache/accumulo/test/randomwalk/concurrent/AddSplits.java
index e026299..dc040a6 100644
--- a/test/src/main/java/org/apache/accumulo/test/randomwalk/concurrent/AddSplits.java
+++ b/test/src/main/java/org/apache/accumulo/test/randomwalk/concurrent/AddSplits.java
@@ -22,7 +22,6 @@ import java.util.Properties;
import java.util.Random;
import java.util.TreeSet;
-import org.apache.accumulo.core.client.AccumuloException;
import org.apache.accumulo.core.client.Connector;
import org.apache.accumulo.core.client.TableNotFoundException;
import org.apache.accumulo.core.client.TableOfflineException;
@@ -58,12 +57,6 @@ public class AddSplits extends Test {
log.debug("AddSplits " + tableName + " failed, doesnt exist");
} catch (TableOfflineException e) {
log.debug("AddSplits " + tableName + " failed, offline");
- } catch (AccumuloException ae) {
- Throwable cause = ae.getCause();
- if (cause != null && cause instanceof TableOfflineException)
- log.debug("AddSplits " + tableName + " failed, offline");
- else
- throw ae;
}
}
}
--
To stop receiving notification emails like this one, please contact
mmiller@apache.org.