public class UniversalCompaction extends Object implements CompactStrategy
See RocksDb Universal-Compaction: https://github.com/facebook/rocksdb/wiki/Universal-Compaction.
Constructor and Description |
---|
UniversalCompaction(int maxSizeAmp,
int sizeRatio,
int numRunCompactionTrigger) |
UniversalCompaction(int maxSizeAmp,
int sizeRatio,
int numRunCompactionTrigger,
java.time.Duration opCompactionInterval) |
Modifier and Type | Method and Description |
---|---|
Optional<CompactUnit> |
pick(int numLevels,
List<LevelSortedRun> runs)
Pick compaction unit from runs.
|
CompactUnit |
pickForSizeRatio(int maxLevel,
List<LevelSortedRun> runs,
int candidateCount,
boolean forcePick) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
pickFullCompaction
public UniversalCompaction(int maxSizeAmp, int sizeRatio, int numRunCompactionTrigger)
public UniversalCompaction(int maxSizeAmp, int sizeRatio, int numRunCompactionTrigger, @Nullable java.time.Duration opCompactionInterval)
public Optional<CompactUnit> pick(int numLevels, List<LevelSortedRun> runs)
CompactStrategy
pick
in interface CompactStrategy
public CompactUnit pickForSizeRatio(int maxLevel, List<LevelSortedRun> runs, int candidateCount, boolean forcePick)
Copyright © 2023–2024 The Apache Software Foundation. All rights reserved.