@InterfaceAudience.Private public class RatioBasedCompactionPolicy extends SortedCompactionPolicy
comConf, storeConfigInfo
Constructor and Description |
---|
RatioBasedCompactionPolicy(org.apache.hadoop.conf.Configuration conf,
StoreConfigInformation storeConfigInfo) |
Modifier and Type | Method and Description |
---|---|
protected ArrayList<HStoreFile> |
applyCompactionPolicy(ArrayList<HStoreFile> candidates,
boolean mayUseOffPeak,
boolean mayBeStuck)
-- Default minor compaction selection algorithm:
choose CompactSelection from candidates --
First exclude bulk-load files if indicated in configuration.
|
protected CompactionRequestImpl |
createCompactionRequest(ArrayList<HStoreFile> candidateSelection,
boolean tryingMajor,
boolean mayUseOffPeak,
boolean mayBeStuck) |
boolean |
needsCompaction(Collection<HStoreFile> storeFiles,
List<HStoreFile> filesCompacting)
A heuristic method to decide whether to schedule a compaction request
|
void |
setMinThreshold(int minThreshold)
Overwrite min threshold for compaction
|
boolean |
shouldPerformMajorCompaction(Collection<HStoreFile> filesToCompact) |
checkMinFilesCriteria, filterBulk, getCurrentEligibleFiles, getNextMajorCompactTime, preSelectCompactionForCoprocessor, removeExcessFiles, selectCompaction, skipLargeFiles, throttleCompaction
getConf, setConf
public RatioBasedCompactionPolicy(org.apache.hadoop.conf.Configuration conf, StoreConfigInformation storeConfigInfo)
public boolean shouldPerformMajorCompaction(Collection<HStoreFile> filesToCompact) throws IOException
shouldPerformMajorCompaction
in class SortedCompactionPolicy
filesToCompact
- Files to compact. Can be null.IOException
protected CompactionRequestImpl createCompactionRequest(ArrayList<HStoreFile> candidateSelection, boolean tryingMajor, boolean mayUseOffPeak, boolean mayBeStuck) throws IOException
createCompactionRequest
in class SortedCompactionPolicy
IOException
protected ArrayList<HStoreFile> applyCompactionPolicy(ArrayList<HStoreFile> candidates, boolean mayUseOffPeak, boolean mayBeStuck) throws IOException
candidates
- pre-filtrateIOException
public boolean needsCompaction(Collection<HStoreFile> storeFiles, List<HStoreFile> filesCompacting)
needsCompaction
in class SortedCompactionPolicy
storeFiles
- files in the store.filesCompacting
- files being scheduled to compact.public void setMinThreshold(int minThreshold)
Copyright © 2007–2019 Cloudera. All rights reserved.