Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add TableOfflineException to TableOps.addSplits #393

Merged
merged 1 commit into from
Mar 1, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -394,6 +394,9 @@ public void addSplits(String tableName, SortedSet<Text> partitionKeys) throws Ta
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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
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;
Expand Down Expand Up @@ -58,12 +57,6 @@ public void visit(State state, Environment env, Properties props) throws Excepti
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;
}
}
}