@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)
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, nodeDataChanged
public 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)
ZKListener
nodeCreated
in class ZKListener
path
- full path of the new nodepublic void nodeChildrenChanged(String path)
ZKListener
nodeChildrenChanged
in class ZKListener
path
- full path of the node whose children have changedpublic void nodeDeleted(String path)
ZKListener
nodeDeleted
in class ZKListener
path
- 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 ZKWatcher getZooKeeperWatcher()
public void stop()
Copyright © 2007–2019 Cloudera. All rights reserved.