public abstract class AbstractBackup extends Task
Task.STATE
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
SNAPSHOT_FOLDER |
Constructor and Description |
---|
AbstractBackup(IConfiguration config) |
Modifier and Type | Method and Description |
---|---|
static java.util.Set<java.nio.file.Path> |
getBackupDirectories(IConfiguration config,
java.lang.String monitoringFolder)
Get all the backup directories for Cassandra.
|
protected java.lang.String |
getColumnFamily(java.io.File backupDir) |
protected java.lang.String |
getKeyspace(java.io.File backupDir) |
protected static java.io.File[] |
getSecondaryIndexDirectories(java.io.File backupDir) |
protected void |
initiateBackup(java.lang.String monitoringFolder,
BackupRestoreUtil backupRestoreUtil) |
protected static boolean |
isAReadableDirectory(java.io.File dir) |
protected abstract void |
processColumnFamily(java.io.File backupDir)
Process the columnfamily in a given snapshot/backup directory.
|
execute, execute, getErrorCount, getExecutionCount, getName, initialize, state
public static final java.lang.String SNAPSHOT_FOLDER
@Inject public AbstractBackup(IConfiguration config)
protected final void initiateBackup(java.lang.String monitoringFolder, BackupRestoreUtil backupRestoreUtil) throws java.lang.Exception
java.lang.Exception
protected java.lang.String getColumnFamily(java.io.File backupDir)
protected java.lang.String getKeyspace(java.io.File backupDir)
protected abstract void processColumnFamily(java.io.File backupDir) throws java.lang.Exception
backupDir
- Location of the backup/snapshot directory in that columnfamily.java.lang.Exception
- throws exception if there is any error in process the directory.public static java.util.Set<java.nio.file.Path> getBackupDirectories(IConfiguration config, java.lang.String monitoringFolder) throws java.lang.Exception
config
- to get the location of the data folder.monitoringFolder
- folder where cassandra backup's are configured.java.lang.Exception
- incase of IOException.protected static java.io.File[] getSecondaryIndexDirectories(java.io.File backupDir)
protected static boolean isAReadableDirectory(java.io.File dir)