Class IncrementalBackupManager
java.lang.Object
org.apache.hadoop.hbase.backup.impl.BackupManager
org.apache.hadoop.hbase.backup.impl.IncrementalBackupManager
- All Implemented Interfaces:
Closeable
,AutoCloseable
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.
-
Nested Class Summary
Modifier and TypeClassDescription(package private) static class
-
Field Summary
Fields inherited from class org.apache.hadoop.hbase.backup.impl.BackupManager
BACKUP_EXCLUSIVE_OPERATION_TIMEOUT_SECONDS_KEY, backupInfo, conf, conn, systemTable
-
Constructor Summary
ConstructorDescriptionIncrementalBackupManager
(Connection conn, org.apache.hadoop.conf.Configuration conf) -
Method Summary
Modifier and TypeMethodDescriptionexcludeProcV2WALs
(List<String> logList) Obtain the list of logs that need to be copied out for this incremental backup.getLogFilesForNewBackup
(Map<String, Long> olderTimestamps, Map<String, Long> newestTimestamps, org.apache.hadoop.conf.Configuration conf, String savedStartCode) For each region server: get all log files newer than the last timestamps but not newer than the newest timestamps.Methods inherited from class org.apache.hadoop.hbase.backup.impl.BackupManager
addIncrementalBackupTableSet, close, createBackupInfo, decorateMasterConfiguration, decorateRegionServerConfiguration, deleteBulkLoadedRows, finishBackupSession, getBackupHistory, getBackupHistory, getBackupInfo, getConf, getConnection, getIncrementalBackupTableSet, initialize, isBackupEnabled, readBackupStartCode, readBulkloadRows, readLogTimestampMap, readRegionServerLastLogRollResult, setBackupInfo, startBackupSession, updateBackupInfo, writeBackupStartCode, writeRegionServerLogTimestamp
-
Field Details
-
LOG
-
-
Constructor Details
-
IncrementalBackupManager
public IncrementalBackupManager(Connection conn, org.apache.hadoop.conf.Configuration conf) throws IOException - Throws:
IOException
-
-
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
-
getLogFilesForNewBackup
private List<String> getLogFilesForNewBackup(Map<String, Long> olderTimestamps, Map<String, throws IOExceptionLong> newestTimestamps, org.apache.hadoop.conf.Configuration conf, String savedStartCode) 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 configurationsavedStartCode
- the startcode (timestamp) of last successful backup.- Returns:
- a list of log files to be backed up
- Throws:
IOException
- exception
-