@InterfaceAudience.Private public class ZKClusterId extends Object
Constructor and Description |
---|
ZKClusterId(ZKWatcher watcher,
Abortable abortable) |
Modifier and Type | Method and Description |
---|---|
String |
getId() |
static UUID |
getUUIDForCluster(ZKWatcher zkw)
Get the UUID for the provided ZK watcher.
|
boolean |
hasId() |
static String |
readClusterIdZNode(ZKWatcher watcher) |
static void |
setClusterId(ZKWatcher watcher,
ClusterId id) |
public boolean hasId()
public String getId()
public static String readClusterIdZNode(ZKWatcher watcher) throws org.apache.zookeeper.KeeperException
org.apache.zookeeper.KeeperException
public static void setClusterId(ZKWatcher watcher, ClusterId id) throws org.apache.zookeeper.KeeperException
org.apache.zookeeper.KeeperException
public static UUID getUUIDForCluster(ZKWatcher zkw) throws org.apache.zookeeper.KeeperException
zkw
- watcher connected to an ensembleorg.apache.zookeeper.KeeperException
- if a ZooKeeper operation failsCopyright © 2007–2019 Cloudera. All rights reserved.