|
||||||||||
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)
|
void |
nodeCreated(String path)
|
void |
nodeDeleted(String path)
|
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 |
---|
getWatcher, 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)
nodeCreated
in class ZooKeeperListener
public void nodeChildrenChanged(String path)
nodeChildrenChanged
in class ZooKeeperListener
public void nodeDeleted(String path)
nodeDeleted
in class ZooKeeperListener
public 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 |