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/06 18:00:11 UTC
[accumulo] branch 1.7 updated: ACCUMULO-4835 Make TableOps throw
TableNotFound (#395)
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 68f70d5 ACCUMULO-4835 Make TableOps throw TableNotFound (#395)
68f70d5 is described below
commit 68f70d5d557ad9ceec8acfb509906dbc19a0cf15
Author: Mike Miller <mm...@apache.org>
AuthorDate: Tue Mar 6 13:00:07 2018 -0500
ACCUMULO-4835 Make TableOps throw TableNotFound (#395)
* Also removed redundant Range assignment in loop
---
.../org/apache/accumulo/core/client/impl/TableOperationsImpl.java | 7 +++++--
1 file changed, 5 insertions(+), 2 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 3015b1d..d976c4d 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
@@ -1069,14 +1069,17 @@ public class TableOperationsImpl extends TableOperationsHelper {
if (Tables.getTableState(context.getInstance(), tableId) != expectedState) {
Tables.clearCache(context.getInstance());
- if (Tables.getTableState(context.getInstance(), tableId) != expectedState) {
+ TableState currentState = Tables.getTableState(context.getInstance(), tableId);
+ if (currentState != expectedState) {
if (!Tables.exists(context.getInstance(), tableId))
throw new TableDeletedException(tableId);
+ if (currentState == TableState.DELETING)
+ throw new TableNotFoundException(tableId, "", "Table is being deleted.");
throw new AccumuloException("Unexpected table state " + tableId + " " + Tables.getTableState(context.getInstance(), tableId) + " != " + expectedState);
}
}
- Range range = new KeyExtent(new Text(tableId), null, null).toMetadataRange();
+ Range range;
if (startRow == null || lastRow == null)
range = new KeyExtent(new Text(tableId), null, null).toMetadataRange();
else
--
To stop receiving notification emails like this one, please contact
mmiller@apache.org.