/** * Sets the specified table as DISABLED in zookeeper. Fails silently if the * table is already disabled in zookeeper. Sets no watches. * * @param tableName * @throws org.apache.zookeeper.KeeperException * unexpected zookeeper exception */ public void setDisabledTable(String tableName) throws KeeperException { synchronized (this.cache) { if (!isDisablingOrDisabledTable(tableName)) { LOG.warn("Moving table " + tableName + " state to disabled but was " + "not first in disabling state: " + this.cache.get(tableName)); } setTableState(tableName, ZooKeeperProtos.Table.State.DISABLED); } }
@Override public void process() { LOG.debug("Handling CLOSED event for " + entityGroupInfo.getEncodedName()); // Check if this table is being disabled or not if (this.assignmentManager.getZKTable().isDisablingOrDisabledTable( this.entityGroupInfo.getTableNameAsString())) { assignmentManager.offlineDisabledEntityGroup(entityGroupInfo); return; } // ZK Node is in CLOSED state, assign it. assignmentManager.getEntityGroupStates().updateEntityGroupState( entityGroupInfo, EntityGroupState.State.CLOSED, null); // This below has to do w/ online enable/disable of a table assignmentManager.removeClosedEntityGroup(entityGroupInfo); assignmentManager.assign(entityGroupInfo, true); }
+ entityGroupInfo.getEntityGroupNameAsString() + " that was online on " + serverName); if (getZKTable().isDisablingOrDisabledTable( entityGroupInfo.getTableNameAsString())) { LOG.debug("Opened entityGroup "
&& assignmentManager.getZKTable().isDisablingOrDisabledTable( egi.getTableNameAsString())) {
/** * Update inmemory structures. * * @param sn * Server that reported the split * @param parent * Parent entityGroup that was split * @param a * Daughter entityGroup A * @param b * Daughter entityGroup B */ public void handleSplitReport(final ServerName sn, final EntityGroupInfo parent, final EntityGroupInfo a, final EntityGroupInfo b) { entityGroupOffline(parent); entityGroupOnline(a, sn); entityGroupOnline(b, sn); // There's a possibility that the entityGroup was splitting while a user // asked // the master to disable, we need to make sure we close those entityGroups // in // that case. This is not racing with the entityGroup server itself since // FSERVER // report is done after the split transaction completed. if (this.zkTable.isDisablingOrDisabledTable(parent.getTableNameAsString())) { unassign(a); unassign(b); } }
if (this.assignmentManager.getZKTable().isDisablingOrDisabledTable( entityGroupInfo.getTableNameAsString())) { debugLog(entityGroupInfo,