org.apache.hadoop.hbase.backup.example
Class HFileArchiveTableMonitor

java.lang.Object
  extended by org.apache.hadoop.hbase.backup.example.HFileArchiveTableMonitor

public class HFileArchiveTableMonitor
extends Object

Monitor the actual tables for which HFiles are archived for long-term retention (always kept unless ZK state changes).

It is internally synchronized to ensure consistent view of the table state.


Constructor Summary
HFileArchiveTableMonitor()
           
 
Method Summary
 void addTable(String table)
          Add the named table to be those being archived.
 void clearArchive()
           
 void removeTable(String table)
           
 void setArchiveTables(List<String> tables)
          Set the tables to be archived.
 boolean shouldArchiveTable(String tableName)
          Determine if the given table should or should not allow its hfiles to be deleted in the archive
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HFileArchiveTableMonitor

public HFileArchiveTableMonitor()
Method Detail

setArchiveTables

public void setArchiveTables(List<String> tables)
Set the tables to be archived. Internally adds each table and attempts to register it.

Note: All previous tables will be removed in favor of these tables.

Parameters:
tables - add each of the tables to be archived.

addTable

public void addTable(String table)
Add the named table to be those being archived. Attempts to register the table

Parameters:
table - name of the table to be registered

removeTable

public void removeTable(String table)

clearArchive

public void clearArchive()

shouldArchiveTable

public boolean shouldArchiveTable(String tableName)
Determine if the given table should or should not allow its hfiles to be deleted in the archive

Parameters:
tableName - name of the table to check
Returns:
true if its store files should be retained, false otherwise


Copyright © 2007-2016 The Apache Software Foundation. All Rights Reserved.