@InterfaceAudience.Private public class RatioBasedCompactionPolicy extends SortedCompactionPolicy
| Modifier and Type | Field and Description | 
|---|---|
private static org.slf4j.Logger | 
LOG  | 
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, throttleCompactiongetConf, setConfprivate static final org.slf4j.Logger LOG
public RatioBasedCompactionPolicy(org.apache.hadoop.conf.Configuration conf, StoreConfigInformation storeConfigInfo)
public boolean shouldPerformMajorCompaction(Collection<HStoreFile> filesToCompact) throws IOException
shouldPerformMajorCompaction in class SortedCompactionPolicyfilesToCompact - Files to compact. Can be null.IOExceptionprotected CompactionRequestImpl createCompactionRequest(ArrayList<HStoreFile> candidateSelection, boolean tryingMajor, boolean mayUseOffPeak, boolean mayBeStuck) throws IOException
createCompactionRequest in class SortedCompactionPolicyIOExceptionprotected ArrayList<HStoreFile> applyCompactionPolicy(ArrayList<HStoreFile> candidates, boolean mayUseOffPeak, boolean mayBeStuck) throws IOException
candidates - pre-filtrateIOExceptionpublic boolean needsCompaction(Collection<HStoreFile> storeFiles, List<HStoreFile> filesCompacting)
needsCompaction in class SortedCompactionPolicystoreFiles - files in the store.filesCompacting - files being scheduled to compact.public void setMinThreshold(int minThreshold)
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.