Class CommitLogArchiver


  • public class CommitLogArchiver
    extends java.lang.Object
    • Field Detail

      • format

        public static final java.text.SimpleDateFormat format
      • archivePending

        public final java.util.Map<java.lang.String,​java.util.concurrent.Future<?>> archivePending
      • restorePointInTime

        public long restorePointInTime
      • precision

        public final java.util.concurrent.TimeUnit precision
    • Constructor Detail

      • CommitLogArchiver

        public CommitLogArchiver​(java.lang.String archiveCommand,
                                 java.lang.String restoreCommand,
                                 java.lang.String restoreDirectories,
                                 long restorePointInTime,
                                 CommitLogPosition snapshotCommitLogPosition,
                                 java.util.concurrent.TimeUnit precision)
    • Method Detail

      • maybeArchive

        public void maybeArchive​(java.lang.String path,
                                 java.lang.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. 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

        public boolean maybeWaitForArchiving​(java.lang.String name)
      • maybeRestoreArchive

        public void maybeRestoreArchive()