@InterfaceAudience.Private public class TableHFileArchiveTracker extends ZKListener
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() |
ZKWatcher |
getZooKeeperWatcher() |
boolean |
keepHFiles(String tableName)
Determine if the given table should or should not allow its hfiles to be deleted
|
void |
nodeChildrenChanged(String path) |
void |
nodeCreated(String path) |
void |
nodeDeleted(String path) |
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)
nodeCreated in class ZKListenerpublic void nodeChildrenChanged(String path)
nodeChildrenChanged in class ZKListenerpublic void nodeDeleted(String path)
nodeDeleted in class ZKListenerpublic 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 ZKWatcher getZooKeeperWatcher()
public void stop()
Copyright © 2007–2019 The Apache Software Foundation. All rights reserved.