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
Modifier and TypeFieldDescriptionprivate final Stoppable
Deprecated.private final AtomicBoolean
Deprecated.private final String
Deprecated.private final Object
Deprecated.private static final org.slf4j.Logger
Deprecated.private final byte[]
Deprecated.Fields inherited from class org.apache.hadoop.hbase.zookeeper.ZKListener
watcher
-
Constructor Summary
ConstructorDescriptionZKLeaderManager
(ZKWatcher watcher, String leaderZNode, byte[] identifier, Stoppable candidate) Deprecated. -
Method Summary
Modifier and TypeMethodDescriptionprivate void
Deprecated.boolean
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 deletedvoid
start()
Deprecated.void
Deprecated.Removes the leader znode, if it is currently claimed by this instance.void
Deprecated.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:ZKListener
Called when a new node has been created.- Overrides:
nodeCreated
in classZKListener
- Parameters:
path
- full path of the new node
-
nodeDeleted
Deprecated.Description copied from class:ZKListener
Called when a node has been deleted- Overrides:
nodeDeleted
in 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.
-