public Integer getValue() { return cfs.getCompactionStrategyManager().getEstimatedRemainingTasks(); } });
public Integer getValue() { return cfs.getCompactionStrategyManager().getEstimatedRemainingTasks(); } });
public boolean compactingRepaired() { return !cfs.getCompactionStrategyManager().onlyPurgeRepairedTombstones() || compactingRepaired; }
@Override public Iterable<SSTableReader> filterSSTables(LifecycleTransaction transaction) { Iterable<SSTableReader> originals = transaction.originals(); if (cfStore.getCompactionStrategyManager().onlyPurgeRepairedTombstones()) originals = Iterables.filter(originals, SSTableReader::isRepaired); List<SSTableReader> sortedSSTables = Lists.newArrayList(originals); Collections.sort(sortedSSTables, SSTableReader.maxTimestampComparator); return sortedSSTables; }
@Override public Iterable<SSTableReader> filterSSTables(LifecycleTransaction transaction) { Iterable<SSTableReader> originals = transaction.originals(); if (cfStore.getCompactionStrategyManager().onlyPurgeRepairedTombstones()) originals = Iterables.filter(originals, SSTableReader::isRepaired); List<SSTableReader> sortedSSTables = Lists.newArrayList(originals); Collections.sort(sortedSSTables, SSTableReader.maxTimestampComparator); return sortedSSTables; }
public CompactionController(ColumnFamilyStore cfs, Set<SSTableReader> compacting, int gcBefore) { this(cfs, compacting, gcBefore, null, cfs.getCompactionStrategyManager().getCompactionParams().tombstoneOption()); }
public CompactionController(ColumnFamilyStore cfs, Set<SSTableReader> compacting, int gcBefore) { this(cfs, compacting, gcBefore, null, cfs.getCompactionStrategyManager().getCompactionParams().tombstoneOption()); }
public int getEstimatedRemainingTasks() { int n = manifest.getEstimatedTasks(); cfs.getCompactionStrategyManager().compactionLogger.pending(this, n); return n; }
public int getEstimatedRemainingTasks() { int n = manifest.getEstimatedTasks(); cfs.getCompactionStrategyManager().compactionLogger.pending(this, n); return n; }
private void updateEstimatedCompactionsByTasks(List<List<SSTableReader>> tasks) { int n = 0; for (List<SSTableReader> bucket : tasks) { for (List<SSTableReader> stcsBucket : getSTCSBuckets(bucket, stcsOptions)) if (stcsBucket.size() >= cfs.getMinimumCompactionThreshold()) n += Math.ceil((double)stcsBucket.size() / cfs.getMaximumCompactionThreshold()); } estimatedRemainingTasks = n; cfs.getCompactionStrategyManager().compactionLogger.pending(this, n); }
private void updateEstimatedCompactionsByTasks(List<List<SSTableReader>> tasks) { int n = 0; for (List<SSTableReader> bucket : tasks) { for (List<SSTableReader> stcsBucket : getSTCSBuckets(bucket, stcsOptions)) if (stcsBucket.size() >= cfs.getMinimumCompactionThreshold()) n += Math.ceil((double)stcsBucket.size() / cfs.getMaximumCompactionThreshold()); } estimatedRemainingTasks = n; cfs.getCompactionStrategyManager().compactionLogger.pending(this, n); }
@Override public Iterable<SSTableReader> filterSSTables(LifecycleTransaction transaction) { Iterable<SSTableReader> originals = transaction.originals(); if (cfStore.getCompactionStrategyManager().onlyPurgeRepairedTombstones()) originals = Iterables.filter(originals, SSTableReader::isRepaired); List<SSTableReader> sortedSSTables = Lists.newArrayList(originals); Collections.sort(sortedSSTables, SSTableReader.maxTimestampComparator); return sortedSSTables; }
private Purger(boolean isForThrift, CompactionController controller, int nowInSec) { super(isForThrift, nowInSec, controller.gcBefore, controller.compactingRepaired() ? Integer.MAX_VALUE : Integer.MIN_VALUE, controller.cfs.getCompactionStrategyManager().onlyPurgeRepairedTombstones(), controller.cfs.metadata.enforceStrictLiveness()); this.controller = controller; }
private Purger(boolean isForThrift, CompactionController controller, int nowInSec) { super(isForThrift, nowInSec, controller.gcBefore, controller.compactingRepaired() ? Integer.MAX_VALUE : Integer.MIN_VALUE, controller.cfs.getCompactionStrategyManager().onlyPurgeRepairedTombstones(), controller.cfs.metadata.enforceStrictLiveness()); this.controller = controller; }
private Purger(boolean isForThrift, CompactionController controller, int nowInSec) { super(isForThrift, nowInSec, controller.gcBefore, controller.compactingRepaired() ? Integer.MAX_VALUE : Integer.MIN_VALUE, controller.cfs.getCompactionStrategyManager().onlyPurgeRepairedTombstones(), controller.cfs.metadata.enforceStrictLiveness()); this.controller = controller; }
@Override public void execute(LifecycleTransaction txn) { logger.debug("Relocating {}", txn.originals()); AbstractCompactionTask task = cfs.getCompactionStrategyManager().getCompactionTask(txn, NO_GC, Long.MAX_VALUE); task.setUserDefined(true); task.setCompactionType(OperationType.RELOCATE); task.execute(metrics); } }, jobs, OperationType.RELOCATE);
@Override public void execute(LifecycleTransaction txn) { logger.debug("Relocating {}", txn.originals()); AbstractCompactionTask task = cfs.getCompactionStrategyManager().getCompactionTask(txn, NO_GC, Long.MAX_VALUE); task.setUserDefined(true); task.setCompactionType(OperationType.RELOCATE); task.execute(metrics); } }, jobs, OperationType.RELOCATE);
@Override public void execute(LifecycleTransaction txn) { logger.debug("Relocating {}", txn.originals()); AbstractCompactionTask task = cfs.getCompactionStrategyManager().getCompactionTask(txn, NO_GC, Long.MAX_VALUE); task.setUserDefined(true); task.setCompactionType(OperationType.RELOCATE); task.execute(metrics); } }, jobs, OperationType.RELOCATE);
@Override public void execute(LifecycleTransaction txn) { AbstractCompactionTask task = cfs.getCompactionStrategyManager().getCompactionTask(txn, NO_GC, Long.MAX_VALUE); task.setUserDefined(true); task.setCompactionType(OperationType.UPGRADE_SSTABLES); task.execute(metrics); } }, jobs, OperationType.UPGRADE_SSTABLES);
@Override public void execute(LifecycleTransaction txn) { AbstractCompactionTask task = cfs.getCompactionStrategyManager().getCompactionTask(txn, NO_GC, Long.MAX_VALUE); task.setUserDefined(true); task.setCompactionType(OperationType.UPGRADE_SSTABLES); task.execute(metrics); } }, jobs, OperationType.UPGRADE_SSTABLES);