org.apache.hadoop.hbase.zookeeper
Class ClusterId

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

public class ClusterId
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
ClusterId(ZooKeeperWatcher watcher, Abortable abortable)
           
 
Method Summary
 String getId()
           
 boolean hasId()
           
static String readClusterIdZNode(ZooKeeperWatcher watcher)
           
static void setClusterId(ZooKeeperWatcher watcher, String id)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ClusterId

public ClusterId(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,
                                String id)
                         throws org.apache.zookeeper.KeeperException
Throws:
org.apache.zookeeper.KeeperException


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