org.apache.hadoop.hbase.zookeeper
Class ZKLeaderManager

java.lang.Object
  extended by org.apache.hadoop.hbase.zookeeper.ZooKeeperListener
      extended by org.apache.hadoop.hbase.zookeeper.ZKLeaderManager

Deprecated. Not used

@Deprecated
@InterfaceAudience.Private
public class ZKLeaderManager
extends ZooKeeperListener

Handles coordination of a single "leader" instance among many possible candidates. The first ZKLeaderManager to successfully create the given znode becomes the leader, allowing the instance to continue with whatever processing must be protected. Other ZKLeaderManager instances will wait to be notified of changes to the leader znode. If the current master instance fails, the ephemeral leader znode will be removed, and all waiting instances will be notified, with the race to claim the leader znode beginning all over again.


Field Summary
 
Fields inherited from class org.apache.hadoop.hbase.zookeeper.ZooKeeperListener
watcher
 
Constructor Summary
ZKLeaderManager(ZooKeeperWatcher watcher, String leaderZNode, byte[] identifier, Stoppable candidate)
          Deprecated.  
 
Method Summary
 boolean hasLeader()
          Deprecated.  
 void nodeCreated(String path)
          Deprecated. Called when a new node has been created.
 void nodeDeleted(String path)
          Deprecated. Called when a node has been deleted
 void start()
          Deprecated.  
 void stepDownAsLeader()
          Deprecated. Removes the leader znode, if it is currently claimed by this instance.
 void waitToBecomeLeader()
          Deprecated. Blocks until this instance has claimed the leader ZNode in ZooKeeper
 
Methods inherited from class org.apache.hadoop.hbase.zookeeper.ZooKeeperListener
nodeChildrenChanged, nodeDataChanged
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ZKLeaderManager

public ZKLeaderManager(ZooKeeperWatcher watcher,
                       String leaderZNode,
                       byte[] identifier,
                       Stoppable candidate)
Deprecated. 
Method Detail

start

public void start()
Deprecated. 

nodeCreated

public void nodeCreated(String path)
Deprecated. 
Description copied from class: ZooKeeperListener
Called when a new node has been created.

Overrides:
nodeCreated in class ZooKeeperListener
Parameters:
path - full path of the new node

nodeDeleted

public void nodeDeleted(String path)
Deprecated. 
Description copied from class: ZooKeeperListener
Called when a node has been deleted

Overrides:
nodeDeleted in class ZooKeeperListener
Parameters:
path - full path of the deleted node

waitToBecomeLeader

public void waitToBecomeLeader()
Deprecated. 
Blocks until this instance has claimed the leader ZNode in ZooKeeper


stepDownAsLeader

public void stepDownAsLeader()
Deprecated. 
Removes the leader znode, if it is currently claimed by this instance.


hasLeader

public boolean hasLeader()
Deprecated. 


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