public static Map<TableState, Set<String>> getEnabledOrEnablingTables(ZooKeeperWatcher zkw)
throws KeeperException {
Map<TableState, Set<String>> enabledTables = new HashMap<TableState, Set<String>>();
List<String> children = ZKUtil.listChildrenNoWatch(zkw, zkw.clientTableZNode);
for (String child : children) {
TableState state = getTableState(zkw, child);
if (state == TableState.ENABLED) {
Set<String> tables = enabledTables.get(state);
if (tables == null) {
tables = new HashSet<String>();
enabledTables.put(TableState.ENABLED, tables);