public class BackupTTLTask extends Task
IConfiguration.getBackupRetentionDays()
. This
operation is executed on CRON and is configured via IBackupRestoreConfig.getBackupTTLMonitorPeriodInSec()
.
To TTL the SSTable components we refer to the first manifest file on the remote file system after the TTL period. Any sstable components referenced in that manifest file should not be deleted. Any other sstable components (files) on remote file system before the TTL period can be safely deleted. Created by aagrawal on 11/26/18.
Task.STATE
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
JOBNAME |
Constructor and Description |
---|
BackupTTLTask(IConfiguration configuration,
IBackupRestoreConfig backupRestoreConfig,
IMetaProxy metaProxy,
IFileSystemContext backupFileSystemCtx,
com.google.inject.Provider<AbstractBackupPath> abstractBackupPathProvider,
InstanceState instanceState) |
Modifier and Type | Method and Description |
---|---|
void |
execute() |
java.lang.String |
getName() |
static TaskTimer |
getTimer(IBackupRestoreConfig backupRestoreConfig)
Interval between trying to TTL data on Remote file system.
|
execute, getErrorCount, getExecutionCount, initialize, state
public static final java.lang.String JOBNAME
@Inject public BackupTTLTask(IConfiguration configuration, IBackupRestoreConfig backupRestoreConfig, @Named(value="v2") IMetaProxy metaProxy, IFileSystemContext backupFileSystemCtx, com.google.inject.Provider<AbstractBackupPath> abstractBackupPathProvider, InstanceState instanceState)
public void execute() throws java.lang.Exception
public static TaskTimer getTimer(IBackupRestoreConfig backupRestoreConfig) throws java.lang.Exception
backupRestoreConfig
- IBackupRestoreConfig.getBackupTTLMonitorPeriodInSec()
to
get configuration details from priam. Use "-1" to disable the service.java.lang.Exception
- if the configuration is not set correctly or are not valid. This is to
ensure we fail-fast.