Class ZKLeaderManager
java.lang.Object
org.apache.hadoop.hbase.zookeeper.ZKListener
org.apache.hadoop.hbase.zookeeper.ZKLeaderManager
Deprecated.
Not used
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
FieldsModifier and TypeFieldDescriptionprivate final StoppableDeprecated.private final AtomicBooleanDeprecated.private final StringDeprecated.private final ObjectDeprecated.private static final org.slf4j.LoggerDeprecated.private final byte[]Deprecated.Fields inherited from class org.apache.hadoop.hbase.zookeeper.ZKListener
watcher -
Constructor Summary
ConstructorsConstructorDescriptionZKLeaderManager(ZKWatcher watcher, String leaderZNode, byte[] identifier, Stoppable candidate) Deprecated. -
Method Summary
Modifier and TypeMethodDescriptionprivate voidDeprecated.booleanDeprecated.voidnodeCreated(String path) Deprecated.Called when a new node has been created.voidnodeDeleted(String path) Deprecated.Called when a node has been deletedvoidstart()Deprecated.voidDeprecated.Removes the leader znode, if it is currently claimed by this instance.voidDeprecated.Blocks until this instance has claimed the leader ZNode in ZooKeeperMethods inherited from class org.apache.hadoop.hbase.zookeeper.ZKListener
getWatcher, nodeChildrenChanged, nodeDataChanged
-
Field Details
-
LOG
Deprecated. -
lock
Deprecated. -
leaderExists
Deprecated. -
leaderZNode
Deprecated. -
nodeId
Deprecated. -
candidate
Deprecated.
-
-
Constructor Details
-
ZKLeaderManager
public ZKLeaderManager(ZKWatcher watcher, String leaderZNode, byte[] identifier, Stoppable candidate) Deprecated.
-
-
Method Details
-
start
Deprecated. -
nodeCreated
Deprecated.Description copied from class:ZKListenerCalled when a new node has been created.- Overrides:
nodeCreatedin classZKListener- Parameters:
path- full path of the new node
-
nodeDeleted
Deprecated.Description copied from class:ZKListenerCalled when a node has been deleted- Overrides:
nodeDeletedin classZKListener- Parameters:
path- full path of the deleted node
-
handleLeaderChange
Deprecated. -
waitToBecomeLeader
Deprecated.Blocks until this instance has claimed the leader ZNode in ZooKeeper -
stepDownAsLeader
Deprecated.Removes the leader znode, if it is currently claimed by this instance. -
hasLeader
Deprecated.
-