Class CompactionTask

    • Field Detail

      • logger

        protected static final org.slf4j.Logger logger
      • gcBefore

        protected final int 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​(java.lang.String keyspaceName,
                                                               java.lang.String columnFamilyName,
                                                               long[] mergedRowCounts,
                                                               long startSize,
                                                               long endSize)
      • getDirectories

        protected Directories getDirectories()
      • getMinRepairedAt

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

        public static java.util.UUID getPendingRepair​(java.util.Set<SSTableReader> sstables)
      • getIsTransient

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

        protected void buildCompactionCandidatesForAvailableDiskSpace​(java.util.Set<SSTableReader> fullyExpiredSSTables)
      • getLevel

        protected int getLevel()
      • partialCompactionsAcceptable

        protected boolean partialCompactionsAcceptable()
      • getMaxDataAge

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