|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.hadoop.hbase.zookeeper.ZooKeeperListener
org.apache.hadoop.hbase.backup.example.TableHFileArchiveTracker
@InterfaceAudience.Private public class TableHFileArchiveTracker
Track HFile archiving state changes in ZooKeeper. Keeps track of the tables whose HFiles should be kept in the archive.
start()
needs to be called to start monitoring for tables to
archive.
Field Summary | |
---|---|
static String |
HFILE_ARCHIVE_ZNODE_PARENT
|
Fields inherited from class org.apache.hadoop.hbase.zookeeper.ZooKeeperListener |
---|
watcher |
Method Summary | |
---|---|
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 |
Methods inherited from class org.apache.hadoop.hbase.zookeeper.ZooKeeperListener |
---|
nodeDataChanged |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String HFILE_ARCHIVE_ZNODE_PARENT
Method Detail |
---|
public void start() throws org.apache.zookeeper.KeeperException
org.apache.zookeeper.KeeperException
- on failure to find/create nodespublic void nodeCreated(String path)
ZooKeeperListener
nodeCreated
in class ZooKeeperListener
path
- full path of the new nodepublic void nodeChildrenChanged(String path)
ZooKeeperListener
nodeChildrenChanged
in class ZooKeeperListener
path
- full path of the node whose children have changedpublic void nodeDeleted(String path)
ZooKeeperListener
nodeDeleted
in class ZooKeeperListener
path
- full path of the deleted nodepublic boolean keepHFiles(String tableName)
tableName
- name of the table to check
public final HFileArchiveTableMonitor getMonitor()
public static TableHFileArchiveTracker create(org.apache.hadoop.conf.Configuration conf) throws ZooKeeperConnectionException, IOException
conf
- to read for zookeeper connection information
IOException
- If a unexpected exception occurs
ZooKeeperConnectionException
- if we can't reach zookeeperpublic ZooKeeperWatcher getZooKeeperWatcher()
public void stop()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |