@InterfaceAudience.Private public class RecoveringRegionWatcher extends ZooKeeperListener
Modifier and Type | Field and Description |
---|---|
private static org.apache.commons.logging.Log |
LOG |
private HRegionServer |
server |
watcher
Constructor and Description |
---|
RecoveringRegionWatcher(ZooKeeperWatcher watcher,
HRegionServer server)
Construct a ZooKeeper event listener.
|
Modifier and Type | Method and Description |
---|---|
void |
nodeChildrenChanged(String path)
Called when an existing node has a child node added or removed.
|
void |
nodeDataChanged(String path)
Called when an existing node has changed data.
|
void |
nodeDeleted(String path)
Called when a node has been deleted
|
private void |
registerWatcher(String path)
Reinstall watcher because watcher only fire once though we're only interested in nodeDeleted
event we need to register the watcher in case other event happens
|
getWatcher, nodeCreated
private static final org.apache.commons.logging.Log LOG
private HRegionServer server
public RecoveringRegionWatcher(ZooKeeperWatcher watcher, HRegionServer server)
public void nodeDeleted(String path)
nodeDeleted
in class ZooKeeperListener
path
- full path of the deleted nodepublic void nodeDataChanged(String path)
ZooKeeperListener
nodeDataChanged
in class ZooKeeperListener
path
- full path of the updated nodepublic void nodeChildrenChanged(String path)
ZooKeeperListener
nodeChildrenChanged
in class ZooKeeperListener
path
- full path of the node whose children have changedprivate void registerWatcher(String path)
Copyright © 2007–2019 The Apache Software Foundation. All rights reserved.