Class HFileArchiveTableMonitor

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

@Private 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.

  • Field Details

  • Constructor Details

  • Method Details

    • 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