@InterfaceAudience.Private public class ZKClusterId extends Object
| Constructor and Description |
|---|
ZKClusterId(ZooKeeperWatcher watcher,
Abortable abortable) |
| Modifier and Type | Method and Description |
|---|---|
String |
getId() |
static UUID |
getUUIDForCluster(ZooKeeperWatcher zkw)
Get the UUID for the provided ZK watcher.
|
boolean |
hasId() |
static String |
readClusterIdZNode(ZooKeeperWatcher watcher) |
static void |
setClusterId(ZooKeeperWatcher watcher,
ClusterId id) |
public ZKClusterId(ZooKeeperWatcher watcher, Abortable abortable)
public boolean hasId()
public String getId()
public static String readClusterIdZNode(ZooKeeperWatcher watcher) throws KeeperException
KeeperExceptionpublic static void setClusterId(ZooKeeperWatcher watcher, ClusterId id) throws KeeperException
KeeperExceptionpublic static UUID getUUIDForCluster(ZooKeeperWatcher zkw) throws KeeperException
zkw - watcher connected to an ensembleKeeperException