org.apache.hadoop.hbase.zookeeper
Class ZKClusterId

java.lang.Object
  extended by org.apache.hadoop.hbase.zookeeper.ZKClusterId

@InterfaceAudience.Private
public class ZKClusterId
extends Object

Publishes and synchronizes a unique identifier specific to a given HBase cluster. The stored identifier is read from the file system by the active master on startup, and is subsequently available to all watchers (including clients).


Constructor Summary
ZKClusterId(ZooKeeperWatcher watcher, Abortable abortable)
           
 
Method Summary
 String getId()
           
 boolean hasId()
           
static String readClusterIdZNode(ZooKeeperWatcher watcher)
           
static void setClusterId(ZooKeeperWatcher watcher, ClusterId id)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ZKClusterId

public ZKClusterId(ZooKeeperWatcher watcher,
                   Abortable abortable)
Method Detail

hasId

public boolean hasId()

getId

public String getId()

readClusterIdZNode

public static String readClusterIdZNode(ZooKeeperWatcher watcher)
                                 throws org.apache.zookeeper.KeeperException
Throws:
org.apache.zookeeper.KeeperException

setClusterId

public static void setClusterId(ZooKeeperWatcher watcher,
                                ClusterId id)
                         throws org.apache.zookeeper.KeeperException
Throws:
org.apache.zookeeper.KeeperException


Copyright © 2013 The Apache Software Foundation. All Rights Reserved.