@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 the TTL expired store files 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, applyCompactionPolicycreateCompactionRequest, setMinThresholdcheckMinFilesCriteria, filterBulk, getCurrentEligibleFiles, getNextMajorCompactTime, preSelectCompactionForCoprocessor, removeExcessFiles, skipLargeFiles, throttleCompactiongetConf, setConfprivate 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 SortedCompactionPolicycandidateFiles - 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.IOExceptionpublic boolean shouldPerformMajorCompaction(Collection<HStoreFile> filesToCompact) throws IOException
shouldPerformMajorCompaction in class RatioBasedCompactionPolicyfilesToCompact - Files to compact. Can be null.IOExceptionpublic boolean needsCompaction(Collection<HStoreFile> storeFiles, List<HStoreFile> filesCompacting)
RatioBasedCompactionPolicyneedsCompaction in class RatioBasedCompactionPolicystoreFiles - 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.