public class ZKTableReadOnly extends Object
AssignmentManager
for reading the
state of a table in ZK.
Does not cache state like ZKTable
, actually reads from ZK each call.
Modifier and Type | Method and Description |
---|---|
static Set<String> |
getDisabledOrDisablingTables(ZooKeeperWatcher zkw)
Gets a list of all the tables set as disabled in zookeeper.
|
static Set<String> |
getDisabledTables(ZooKeeperWatcher zkw)
Gets a list of all the tables set as disabled in zookeeper.
|
static boolean |
isDisabledTable(ZooKeeperWatcher zkw,
String tableName)
Go to zookeeper and see if state of table is
ZKTable.TableState.DISABLED . |
static boolean |
isDisablingOrDisabledTable(ZooKeeperWatcher zkw,
String tableName)
Go to zookeeper and see if state of table is
ZKTable.TableState.DISABLING
of ZKTable.TableState.DISABLED . |
static boolean |
isEnabledTable(ZooKeeperWatcher zkw,
String tableName)
Go to zookeeper and see if state of table is
ZKTable.TableState.ENABLED . |
public static boolean isDisabledTable(ZooKeeperWatcher zkw, String tableName) throws org.apache.zookeeper.KeeperException
ZKTable.TableState.DISABLED
.
This method does not use cache as #isDisabledTable(String)
does.
This method is for clients other than AssignmentManager
zkw
- tableName
- org.apache.zookeeper.KeeperException
public static boolean isEnabledTable(ZooKeeperWatcher zkw, String tableName) throws org.apache.zookeeper.KeeperException
ZKTable.TableState.ENABLED
.zkw
- tableName
- org.apache.zookeeper.KeeperException
public static boolean isDisablingOrDisabledTable(ZooKeeperWatcher zkw, String tableName) throws org.apache.zookeeper.KeeperException
ZKTable.TableState.DISABLING
of ZKTable.TableState.DISABLED
.zkw
- tableName
- org.apache.zookeeper.KeeperException
public static Set<String> getDisabledTables(ZooKeeperWatcher zkw) throws org.apache.zookeeper.KeeperException
org.apache.zookeeper.KeeperException
public static Set<String> getDisabledOrDisablingTables(ZooKeeperWatcher zkw) throws org.apache.zookeeper.KeeperException
org.apache.zookeeper.KeeperException
Copyright © 2014 The Apache Software Foundation. All Rights Reserved.