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
Nested ClassesModifier and TypeClassDescriptionprivate static final record(package private) static class -
Field Summary
FieldsFields inherited from class org.apache.hadoop.hbase.backup.impl.BackupManager
BACKUP_EXCLUSIVE_OPERATION_TIMEOUT_SECONDS_KEY, backupInfo, conf, conn, systemTable -
Constructor Summary
ConstructorsConstructorDescriptionIncrementalBackupManager(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) Gather all log files that either: 1) are newer than the older timestamps, but not newer than the newest timestamps, or 2) are archived logs whose host name does not occur in the newest timestamps.Methods inherited from class org.apache.hadoop.hbase.backup.impl.BackupManager
addContinuousBackupTableSet, addIncrementalBackupTableSet, close, createBackupInfo, decorateMasterConfiguration, decorateRegionServerConfiguration, deleteBulkLoadedRows, finishBackupSession, getBackupHistory, getBackupInfo, getConf, getConnection, getIncrementalBackupTableSet, initialize, isBackupEnabled, readBulkloadRows, readBulkloadRows, readLogTimestampMap, readRegionServerLastLogRollResult, setBackupInfo, startBackupSession, updateBackupInfo, 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 map of RS log time stamps for this incremental backup, as computed by
BackupUtils.computeLogBoundaries(java.util.Map<java.lang.String, java.lang.Long>, java.util.Collection<java.lang.String>, java.util.Collection<java.lang.String>): the included logs are covered, the logs held back for a later backup (for example, logs still being split) are pending, and a host that still has logs keeps its previous boundary if this backup gives it no new one. - Throws:
IOException- exception
-
excludeProcV2WALs
-
getLogFilesForNewBackup
private IncrementalBackupManager.LogFileSelection getLogFilesForNewBackup(Map<String, Long> olderTimestamps, Map<String, throws IOExceptionLong> newestTimestamps, org.apache.hadoop.conf.Configuration conf) Gather all log files that either: 1) are newer than the older timestamps, but not newer than the newest timestamps, or 2) are archived logs whose host name does not occur in 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- Returns:
- the log files to be backed up, the log files held back for a later backup, and the hosts that have any log files, including ones not backed up
- Throws:
IOException- exception
-