@InterfaceAudience.Private public class FIFOCompactionPolicy extends ExploringCompactionPolicy
comConf, storeConfigInfo
Constructor and Description |
---|
FIFOCompactionPolicy(org.apache.hadoop.conf.Configuration conf,
StoreConfigInformation storeConfigInfo) |
Modifier and Type | Method and Description |
---|---|
boolean |
needsCompaction(Collection<StoreFile> storeFiles,
List<StoreFile> filesCompacting)
A heuristic method to decide whether to schedule a compaction request
|
CompactionRequest |
selectCompaction(Collection<StoreFile> candidateFiles,
List<StoreFile> filesCompacting,
boolean isUserCompaction,
boolean mayUseOffPeak,
boolean forceMajor) |
boolean |
shouldPerformMajorCompaction(Collection<StoreFile> filesToCompact) |
applyCompactionPolicy, applyCompactionPolicy
createCompactionRequest, setMinThreshold
checkMinFilesCriteria, filterBulk, getCurrentEligibleFiles, getNextMajorCompactTime, preSelectCompactionForCoprocessor, removeExcessFiles, skipLargeFiles, throttleCompaction
getConf, setConf
public FIFOCompactionPolicy(org.apache.hadoop.conf.Configuration conf, StoreConfigInformation storeConfigInfo)
public CompactionRequest selectCompaction(Collection<StoreFile> candidateFiles, List<StoreFile> filesCompacting, boolean isUserCompaction, boolean mayUseOffPeak, boolean forceMajor) throws IOException
selectCompaction
in class SortedCompactionPolicy
candidateFiles
- candidate files, ordered from oldest to newest by seqId. We rely on
DefaultStoreFileManager to sort the files by seqId to guarantee contiguous compaction based
on seqId for data consistency.IOException
public boolean shouldPerformMajorCompaction(Collection<StoreFile> filesToCompact) throws IOException
shouldPerformMajorCompaction
in class RatioBasedCompactionPolicy
filesToCompact
- Files to compact. Can be null.IOException
public boolean needsCompaction(Collection<StoreFile> storeFiles, List<StoreFile> filesCompacting)
RatioBasedCompactionPolicy
needsCompaction
in class RatioBasedCompactionPolicy
storeFiles
- files in the store.filesCompacting
- files being scheduled to compact.Copyright © 2007–2019 The Apache Software Foundation. All rights reserved.