@InterfaceAudience.Private public class ExploringCompactionPolicy extends RatioBasedCompactionPolicy
| Modifier and Type | Field and Description |
|---|---|
private static org.apache.commons.logging.Log |
LOG |
comConf, storeConfigInfo| Constructor and Description |
|---|
ExploringCompactionPolicy(org.apache.hadoop.conf.Configuration conf,
StoreConfigInformation storeConfigInfo)
Constructor for ExploringCompactionPolicy.
|
| Modifier and Type | Method and Description |
|---|---|
(package private) ArrayList<StoreFile> |
applyCompactionPolicy(ArrayList<StoreFile> candidates,
boolean mayUseOffPeak,
boolean mightBeStuck) |
List<StoreFile> |
applyCompactionPolicy(List<StoreFile> candidates,
boolean mightBeStuck,
boolean mayUseOffPeak,
int minFiles,
int maxFiles) |
private boolean |
filesInRatio(List<StoreFile> files,
double currentRatio)
Check that all files satisfy the constraint
FileSize(i) <= ( Sum(0,N,FileSize(_)) - FileSize(i) ) * Ratio.
|
private long |
getTotalStoreSize(List<StoreFile> potentialMatchFiles)
Find the total size of a list of store files.
|
private boolean |
isBetterSelection(List<StoreFile> bestSelection,
long bestSize,
List<StoreFile> selection,
long size,
boolean mightBeStuck) |
getNextMajorCompactTime, isMajorCompaction, needsCompaction, preSelectCompactionForCoprocessor, selectCompaction, throttleCompactiongetConf, setConfpublic ExploringCompactionPolicy(org.apache.hadoop.conf.Configuration conf,
StoreConfigInformation storeConfigInfo)
conf - The configuration objectstoreConfigInfo - An object to provide info about the store.final ArrayList<StoreFile> applyCompactionPolicy(ArrayList<StoreFile> candidates, boolean mayUseOffPeak, boolean mightBeStuck) throws IOException
applyCompactionPolicy in class RatioBasedCompactionPolicycandidates - pre-filtrateIOExceptionpublic List<StoreFile> applyCompactionPolicy(List<StoreFile> candidates, boolean mightBeStuck, boolean mayUseOffPeak, int minFiles, int maxFiles)
private boolean isBetterSelection(List<StoreFile> bestSelection, long bestSize, List<StoreFile> selection, long size, boolean mightBeStuck)
private long getTotalStoreSize(List<StoreFile> potentialMatchFiles)
potentialMatchFiles - StoreFile list.private boolean filesInRatio(List<StoreFile> files, double currentRatio)
files - List of store files to consider as a compaction candidate.currentRatio - The ratio to use.Copyright © 2007–2019 The Apache Software Foundation. All rights reserved.