@InterfaceAudience.Private public class ExploringCompactionPolicy extends RatioBasedCompactionPolicy
Modifier and Type | Field and Description |
---|---|
private static org.slf4j.Logger |
LOG |
comConf, storeConfigInfo
Constructor and Description |
---|
ExploringCompactionPolicy(org.apache.hadoop.conf.Configuration conf,
StoreConfigInformation storeConfigInfo)
Constructor for ExploringCompactionPolicy.
|
Modifier and Type | Method and Description |
---|---|
protected ArrayList<HStoreFile> |
applyCompactionPolicy(ArrayList<HStoreFile> candidates,
boolean mayUseOffPeak,
boolean mightBeStuck)
-- Default minor compaction selection algorithm:
choose CompactSelection from candidates --
First exclude bulk-load files if indicated in configuration.
|
List<HStoreFile> |
applyCompactionPolicy(List<HStoreFile> candidates,
boolean mightBeStuck,
boolean mayUseOffPeak,
int minFiles,
int maxFiles) |
private boolean |
filesInRatio(List<HStoreFile> files,
double currentRatio)
Check that all files satisfy the constraint
FileSize(i) <= ( Sum(0,N,FileSize(_)) - FileSize(i) ) * Ratio.
|
private long |
getTotalStoreSize(List<HStoreFile> potentialMatchFiles)
Find the total size of a list of store files.
|
private boolean |
isBetterSelection(List<HStoreFile> bestSelection,
long bestSize,
List<HStoreFile> selection,
long size,
boolean mightBeStuck) |
createCompactionRequest, needsCompaction, setMinThreshold, shouldPerformMajorCompaction
checkMinFilesCriteria, filterBulk, getCurrentEligibleFiles, getNextMajorCompactTime, preSelectCompactionForCoprocessor, removeExcessFiles, selectCompaction, skipLargeFiles, throttleCompaction
getConf, setConf
private static final org.slf4j.Logger LOG
public ExploringCompactionPolicy(org.apache.hadoop.conf.Configuration conf, StoreConfigInformation storeConfigInfo)
conf
- The configuration objectstoreConfigInfo
- An object to provide info about the store.protected final ArrayList<HStoreFile> applyCompactionPolicy(ArrayList<HStoreFile> candidates, boolean mayUseOffPeak, boolean mightBeStuck) throws IOException
RatioBasedCompactionPolicy
applyCompactionPolicy
in class RatioBasedCompactionPolicy
candidates
- pre-filtrateIOException
public List<HStoreFile> applyCompactionPolicy(List<HStoreFile> candidates, boolean mightBeStuck, boolean mayUseOffPeak, int minFiles, int maxFiles)
private boolean isBetterSelection(List<HStoreFile> bestSelection, long bestSize, List<HStoreFile> selection, long size, boolean mightBeStuck)
private long getTotalStoreSize(List<HStoreFile> potentialMatchFiles)
potentialMatchFiles
- StoreFile list.private boolean filesInRatio(List<HStoreFile> files, double currentRatio)
files
- List of store files to consider as a compaction candidate.currentRatio
- The ratio to use.Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.