@InterfaceAudience.Private public class FIFOCompactionPolicy extends ExploringCompactionPolicy
Modifier and Type | Field and Description |
---|---|
private static org.slf4j.Logger |
LOG |
comConf, storeConfigInfo
Constructor and Description |
---|
FIFOCompactionPolicy(org.apache.hadoop.conf.Configuration conf,
StoreConfigInformation storeConfigInfo) |
Modifier and Type | Method and Description |
---|---|
private Collection<HStoreFile> |
getExpiredStores(Collection<HStoreFile> files,
Collection<HStoreFile> filesCompacting) |
private boolean |
hasExpiredStores(Collection<HStoreFile> files) |
private boolean |
isEmptyStoreFile(HStoreFile sf)
The FIFOCompactionPolicy only choose those TTL expired HFiles as the compaction candidates.
|
boolean |
needsCompaction(Collection<HStoreFile> storeFiles,
List<HStoreFile> filesCompacting)
A heuristic method to decide whether to schedule a compaction request
|
CompactionRequestImpl |
selectCompaction(Collection<HStoreFile> candidateFiles,
List<HStoreFile> filesCompacting,
boolean isUserCompaction,
boolean mayUseOffPeak,
boolean forceMajor) |
boolean |
shouldPerformMajorCompaction(Collection<HStoreFile> filesToCompact) |
applyCompactionPolicy, applyCompactionPolicy
createCompactionRequest, setMinThreshold
checkMinFilesCriteria, filterBulk, getCurrentEligibleFiles, getNextMajorCompactTime, preSelectCompactionForCoprocessor, removeExcessFiles, skipLargeFiles, throttleCompaction
getConf, setConf
private static final org.slf4j.Logger LOG
public FIFOCompactionPolicy(org.apache.hadoop.conf.Configuration conf, StoreConfigInformation storeConfigInfo)
public CompactionRequestImpl selectCompaction(Collection<HStoreFile> candidateFiles, List<HStoreFile> 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<HStoreFile> filesToCompact) throws IOException
shouldPerformMajorCompaction
in class RatioBasedCompactionPolicy
filesToCompact
- Files to compact. Can be null.IOException
public boolean needsCompaction(Collection<HStoreFile> storeFiles, List<HStoreFile> filesCompacting)
RatioBasedCompactionPolicy
needsCompaction
in class RatioBasedCompactionPolicy
storeFiles
- files in the store.filesCompacting
- files being scheduled to compact.private boolean isEmptyStoreFile(HStoreFile sf)
private boolean hasExpiredStores(Collection<HStoreFile> files)
private Collection<HStoreFile> getExpiredStores(Collection<HStoreFile> files, Collection<HStoreFile> filesCompacting)
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.