Merge branch '1.8'
diff --git a/server/master/src/main/java/org/apache/accumulo/master/TabletGroupWatcher.java b/server/master/src/main/java/org/apache/accumulo/master/TabletGroupWatcher.java
index 9d8a1d1..aa235d6 100644
--- a/server/master/src/main/java/org/apache/accumulo/master/TabletGroupWatcher.java
+++ b/server/master/src/main/java/org/apache/accumulo/master/TabletGroupWatcher.java
@@ -322,13 +322,10 @@
case SUSPENDED:
// Request a move to UNASSIGNED, so as to allow balancing to continue.
suspendedToGoneServers.add(tls);
- // Fall through to unassigned to cancel migrations.
+ cancelOfflineTableMigrations(tls);
+ break;
case UNASSIGNED:
- TServerInstance dest = this.master.migrations.get(tls.extent);
- TableState tableState = TableManager.getInstance().getTableState(tls.extent.getTableId());
- if (dest != null && tableState == TableState.OFFLINE) {
- this.master.migrations.remove(tls.extent);
- }
+ cancelOfflineTableMigrations(tls);
break;
case ASSIGNED_TO_DEAD_SERVER:
assignedToDeadServers.add(tls);
@@ -401,6 +398,14 @@
}
}
+ private void cancelOfflineTableMigrations(TabletLocationState tls) {
+ TServerInstance dest = this.master.migrations.get(tls.extent);
+ TableState tableState = TableManager.getInstance().getTableState(tls.extent.getTableId());
+ if (dest != null && tableState == TableState.OFFLINE) {
+ this.master.migrations.remove(tls.extent);
+ }
+ }
+
private void repairMetadata(Text row) {
Master.log.debug("Attempting repair on " + row);
// ACCUMULO-2261 if a dying tserver writes a location before its lock information propagates, it may cause duplicate assignment.