Class CommitLogArchiver
java.lang.Object
org.apache.cassandra.db.commitlog.CommitLogArchiver
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionCommitLogArchiver(String archiveCommand, String restoreCommand, String restoreDirectories, long restorePointInTimeInMicroseconds, CommitLogPosition snapshotCommitLogPosition, TimeUnit precision) -
Method Summary
Modifier and TypeMethodDescriptionstatic CommitLogArchiverstatic CommitLogArchiverdisabled()static longgetRestorationPointInTimeInMicroseconds(String restorationPointInTime) We change the restore_point_in_time from configuration file into microseconds level as Cassandra use microseconds as the timestamp.longvoidmaybeArchive(String path, String name) Differs from the above because it can be used on any file, rather than only managed commit log segments (and thus cannot call waitForFinalSync), and in the treatment of failures.voidmaybeArchive(CommitLogSegment segment) voidbooleanmaybeWaitForArchiving(String name) voidsetPrecision(TimeUnit timeUnit) voidsetRestorePointInTimeInMicroseconds(long restorePointInTimeInMicroseconds)
-
Field Details
-
format
-
archivePending
-
-
Constructor Details
-
CommitLogArchiver
public CommitLogArchiver(String archiveCommand, String restoreCommand, String restoreDirectories, long restorePointInTimeInMicroseconds, CommitLogPosition snapshotCommitLogPosition, TimeUnit precision)
-
-
Method Details
-
disabled
-
construct
-
maybeArchive
-
maybeArchive
Differs from the above because it can be used on any file, rather than only managed commit log segments (and thus cannot call waitForFinalSync), and in the treatment of failures.Used to archive files present in the commit log directory at startup (CASSANDRA-6904). Since the files being already archived by normal operation could cause subsequent hard-linking or other operations to fail, we should not throw errors on failure
-
maybeWaitForArchiving
-
maybeRestoreArchive
public void maybeRestoreArchive() -
getRestorationPointInTimeInMicroseconds
We change the restore_point_in_time from configuration file into microseconds level as Cassandra use microseconds as the timestamp.- Parameters:
restorationPointInTime- value of "restore_point_in_time" in properties file.- Returns:
- microseconds value of restore_point_in_time
-
getRestorePointInTimeInMicroseconds
public long getRestorePointInTimeInMicroseconds() -
setRestorePointInTimeInMicroseconds
public void setRestorePointInTimeInMicroseconds(long restorePointInTimeInMicroseconds) -
setPrecision
-