Class TimeWindowCompactionStrategy

    • Field Detail

      • estimatedRemainingTasks

        protected volatile int estimatedRemainingTasks
    • Constructor Detail

      • TimeWindowCompactionStrategy

        public TimeWindowCompactionStrategy​(ColumnFamilyStore cfs,
                                            java.util.Map<java.lang.String,​java.lang.String> options)
    • Method Detail

      • getNextBackgroundTask

        public AbstractCompactionTask getNextBackgroundTask​(long gcBefore)
        Specified by:
        getNextBackgroundTask in class AbstractCompactionStrategy
        Parameters:
        gcBefore - throw away tombstones older than this
        Returns:
        the next background/minor compaction task to run; null if nothing to do. Is responsible for marking its sstables as compaction-pending.
      • getWindowBoundsInMillis

        public static Pair<java.lang.Long,​java.lang.Long> getWindowBoundsInMillis​(java.util.concurrent.TimeUnit windowTimeUnit,
                                                                                        int windowTimeSize,
                                                                                        long timestampInMillis)
        Find the lowest and highest timestamps in a given timestamp/unit pair Returns milliseconds, caller should adjust accordingly
      • getMaximalTask

        public java.util.Collection<AbstractCompactionTask> getMaximalTask​(long gcBefore,
                                                                           boolean splitOutput)
        Specified by:
        getMaximalTask in class AbstractCompactionStrategy
        Parameters:
        gcBefore - throw away tombstones older than this
        Returns:
        a compaction task that should be run to compact this columnfamilystore as much as possible. Null if nothing to do. Is responsible for marking its sstables as compaction-pending.
      • getUserDefinedTask

        public AbstractCompactionTask getUserDefinedTask​(java.util.Collection<SSTableReader> sstables,
                                                         long gcBefore)
        Specified by:
        getUserDefinedTask in class AbstractCompactionStrategy
        Parameters:
        sstables - SSTables to compact. Must be marked as compacting.
        gcBefore - throw away tombstones older than this
        Returns:
        a compaction task corresponding to the requested sstables. Will not be null. (Will throw if user requests an invalid compaction.) Is responsible for marking its sstables as compaction-pending.
      • getSSTableCountByBuckets

        public java.util.Map<java.lang.Long,​java.lang.Integer> getSSTableCountByBuckets()
      • validateOptions

        public static java.util.Map<java.lang.String,​java.lang.String> validateOptions​(java.util.Map<java.lang.String,​java.lang.String> options)
                                                                                      throws ConfigurationException
        Throws:
        ConfigurationException
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object