Class IncrementalBackupManager

java.lang.Object
org.apache.hadoop.hbase.backup.impl.BackupManager
org.apache.hadoop.hbase.backup.impl.IncrementalBackupManager
All Implemented Interfaces:
Closeable, AutoCloseable

@Private public class IncrementalBackupManager extends BackupManager
After a full backup was created, the incremental backup will only store the changes made after the last full or incremental backup. Creating the backup copies the logfiles in .logs and .oldlogs since the last backup timestamp.
  • Field Details

    • LOG

      public static final org.slf4j.Logger LOG
  • Constructor Details

  • Method Details

    • getIncrBackupLogFileMap

      Obtain the list of logs that need to be copied out for this incremental backup. The list is set in BackupInfo.
      Returns:
      The new HashMap of RS log time stamps after the log roll for this incremental backup.
      Throws:
      IOException - exception
    • excludeProcV2WALs

      private List<String> excludeProcV2WALs(List<String> logList)
    • getLogFilesForNewBackup

      private List<String> getLogFilesForNewBackup(Map<String,Long> olderTimestamps, Map<String,Long> newestTimestamps, org.apache.hadoop.conf.Configuration conf, String savedStartCode) throws IOException
      For each region server: get all log files newer than the last timestamps but not newer than the newest timestamps.
      Parameters:
      olderTimestamps - the timestamp for each region server of the last backup.
      newestTimestamps - the timestamp for each region server that the backup should lead to.
      conf - the Hadoop and Hbase configuration
      savedStartCode - the startcode (timestamp) of last successful backup.
      Returns:
      a list of log files to be backed up
      Throws:
      IOException - exception