/** * Recover the tables that were not fully moved to DISABLED state. These * tables are in DISABLING state when the master restarted/switched. * * @throws org.apache.zookeeper.KeeperException * @throws com.alibaba.wasp.TableNotFoundException * @throws java.io.IOException */ private void recoverTableInDisablingState() throws KeeperException, TableNotFoundException, IOException { Set<String> disablingTables = ZKTable.getDisablingTables(watcher); if (disablingTables.size() != 0) { for (String tableName : disablingTables) { // Recover by calling DisableTableHandler LOG.info("The table " + tableName + " is in DISABLING state. Hence recovering by moving the table" + " to DISABLED state."); new DisableTableHandler(this.server, this, tableName.getBytes(), (FMasterServices) this.server, true).process(); } } }
disabledOrEnablingTables.addAll(enablingTables); Set<String> disabledOrDisablingOrEnabling = ZKTable .getDisablingTables(watcher); disabledOrDisablingOrEnabling.addAll(disabledOrEnablingTables);