Class HFileArchiveTableMonitor
java.lang.Object
org.apache.hadoop.hbase.backup.example.HFileArchiveTableMonitor
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.
-
Field Summary
Modifier and TypeFieldDescriptionprivate static final org.slf4j.Logger
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Add the named table to be those being archived.void
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
-
Field Details
-
LOG
-
archivedTables
-
-
Constructor Details
-
HFileArchiveTableMonitor
public HFileArchiveTableMonitor()
-
-
Method Details
-
setArchiveTables
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
Add the named table to be those being archived. Attempts to register the table- Parameters:
table
- name of the table to be registered
-
removeTable
-
clearArchive
-
shouldArchiveTable
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
-