@InterfaceAudience.Private public class TableHFileArchiveTracker extends ZooKeeperListener
start() needs to be called to start monitoring for tables to
archive.
| Modifier and Type | Field and Description |
|---|---|
static String |
HFILE_ARCHIVE_ZNODE_PARENT |
watcher| Modifier and Type | Method and Description |
|---|---|
static TableHFileArchiveTracker |
create(org.apache.hadoop.conf.Configuration conf)
Create an archive tracker for the passed in server
|
HFileArchiveTableMonitor |
getMonitor() |
ZooKeeperWatcher |
getZooKeeperWatcher() |
boolean |
keepHFiles(String tableName)
Determine if the given table should or should not allow its hfiles to be deleted
|
void |
nodeChildrenChanged(String path)
Called when an existing node has a child node added or removed.
|
void |
nodeCreated(String path)
Called when a new node has been created.
|
void |
nodeDeleted(String path)
Called when a node has been deleted
|
void |
start()
Start monitoring for archive updates
|
void |
stop()
Stop this tracker and the passed zookeeper
|
getWatcher, nodeDataChangedpublic static final String HFILE_ARCHIVE_ZNODE_PARENT
public void start()
throws org.apache.zookeeper.KeeperException
org.apache.zookeeper.KeeperException - on failure to find/create nodespublic void nodeCreated(String path)
ZooKeeperListenernodeCreated in class ZooKeeperListenerpath - full path of the new nodepublic void nodeChildrenChanged(String path)
ZooKeeperListenernodeChildrenChanged in class ZooKeeperListenerpath - full path of the node whose children have changedpublic void nodeDeleted(String path)
ZooKeeperListenernodeDeleted in class ZooKeeperListenerpath - full path of the deleted nodepublic boolean keepHFiles(String tableName)
tableName - name of the table to checkpublic final HFileArchiveTableMonitor getMonitor()
public static TableHFileArchiveTracker create(org.apache.hadoop.conf.Configuration conf) throws ZooKeeperConnectionException, IOException
conf - to read for zookeeper connection informationIOException - If a unexpected exception occursZooKeeperConnectionException - if we can't reach zookeeperpublic ZooKeeperWatcher getZooKeeperWatcher()
public void stop()
Copyright © 2014 The Apache Software Foundation. All rights reserved.