Class CompactionTask

    • Field Detail

      • logger

        protected static final org.slf4j.Logger logger
      • gcBefore

        protected final long gcBefore
      • keepOriginals

        protected final boolean keepOriginals
      • totalBytesCompacted

        protected static long totalBytesCompacted
    • Method Detail

      • addToTotalBytesCompacted

        public static long addToTotalBytesCompacted​(long bytesCompacted)
      • reduceScopeForLimitedSpace

        public boolean reduceScopeForLimitedSpace​(java.util.Set<SSTableReader> nonExpiredSSTables,
                                                  long expectedSize)
      • runMayThrow

        protected void runMayThrow()
                            throws java.lang.Exception
        For internal use and testing only. The rest of the system should go through the submit* methods, which are properly serialized. Caller is in charge of marking/unmarking the sstables as compacting.
        Specified by:
        runMayThrow in class WrappedRunnable
        Throws:
        java.lang.Exception
      • updateCompactionHistory

        public static java.lang.String updateCompactionHistory​(TimeUUID taskId,
                                                               java.lang.String keyspaceName,
                                                               java.lang.String columnFamilyName,
                                                               long[] mergedRowCounts,
                                                               long startSize,
                                                               long endSize,
                                                               java.util.Map<java.lang.String,​java.lang.String> compactionProperties)
      • getDirectories

        protected Directories getDirectories()
      • getMinRepairedAt

        public static long getMinRepairedAt​(java.util.Set<SSTableReader> actuallyCompact)
      • getIsTransient

        public static boolean getIsTransient​(java.util.Set<SSTableReader> sstables)
      • buildCompactionCandidatesForAvailableDiskSpace

        protected boolean buildCompactionCandidatesForAvailableDiskSpace​(java.util.Set<SSTableReader> fullyExpiredSSTables,
                                                                         TimeUUID taskId)
      • getLevel

        protected int getLevel()
      • partialCompactionsAcceptable

        protected boolean partialCompactionsAcceptable()
      • getMaxDataAge

        public static long getMaxDataAge​(java.util.Collection<SSTableReader> sstables)