org.apache.hadoop.hbase.zookeeper
Class ClusterStatusTracker
java.lang.Object
org.apache.hadoop.hbase.zookeeper.ZooKeeperListener
org.apache.hadoop.hbase.zookeeper.ZooKeeperNodeTracker
org.apache.hadoop.hbase.zookeeper.ClusterStatusTracker
public class ClusterStatusTracker
- extends ZooKeeperNodeTracker
Tracker on cluster settings up in zookeeper.
This is not related to ClusterStatus
. That class is a data structure
that holds snapshot of current view on cluster. This class is about tracking
cluster attributes up in zookeeper.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ClusterStatusTracker
public ClusterStatusTracker(ZooKeeperWatcher watcher,
Abortable abortable)
- Creates a cluster status tracker.
After construction, use ZooKeeperNodeTracker.start()
to kick off tracking.
- Parameters:
watcher
- abortable
-
isClusterUp
public boolean isClusterUp()
- Checks if cluster is up.
- Returns:
- true if root region location is available, false if not
setClusterUp
public void setClusterUp()
throws org.apache.zookeeper.KeeperException
- Sets the cluster as up.
- Throws:
org.apache.zookeeper.KeeperException
- unexpected zk exception
setClusterDown
public void setClusterDown()
throws org.apache.zookeeper.KeeperException
- Sets the cluster as down by deleting the znode.
- Throws:
org.apache.zookeeper.KeeperException
- unexpected zk exception
Copyright © 2011 The Apache Software Foundation. All Rights Reserved.