@InterfaceAudience.Private public abstract class SortedCompactionPolicy extends CompactionPolicy
comConf, storeConfigInfo| 构造器和说明 |
|---|
SortedCompactionPolicy(org.apache.hadoop.conf.Configuration conf,
StoreConfigInformation storeConfigInfo) |
| 限定符和类型 | 方法和说明 |
|---|---|
protected ArrayList<HStoreFile> |
checkMinFilesCriteria(ArrayList<HStoreFile> candidates,
int minFiles) |
protected abstract CompactionRequestImpl |
createCompactionRequest(ArrayList<HStoreFile> candidateSelection,
boolean tryingMajor,
boolean mayUseOffPeak,
boolean mayBeStuck) |
protected ArrayList<HStoreFile> |
filterBulk(ArrayList<HStoreFile> candidates) |
protected ArrayList<HStoreFile> |
getCurrentEligibleFiles(ArrayList<HStoreFile> candidateFiles,
List<HStoreFile> filesCompacting) |
long |
getNextMajorCompactTime(Collection<HStoreFile> filesToCompact) |
abstract boolean |
needsCompaction(Collection<HStoreFile> storeFiles,
List<HStoreFile> filesCompacting) |
List<HStoreFile> |
preSelectCompactionForCoprocessor(Collection<HStoreFile> candidates,
List<HStoreFile> filesCompacting) |
protected void |
removeExcessFiles(ArrayList<HStoreFile> candidates,
boolean isUserCompaction,
boolean isMajorCompaction) |
CompactionRequestImpl |
selectCompaction(Collection<HStoreFile> candidateFiles,
List<HStoreFile> filesCompacting,
boolean isUserCompaction,
boolean mayUseOffPeak,
boolean forceMajor) |
abstract boolean |
shouldPerformMajorCompaction(Collection<HStoreFile> filesToCompact) |
protected ArrayList<HStoreFile> |
skipLargeFiles(ArrayList<HStoreFile> candidates,
boolean mayUseOffpeak) |
boolean |
throttleCompaction(long compactionSize) |
getConf, setConfpublic SortedCompactionPolicy(org.apache.hadoop.conf.Configuration conf,
StoreConfigInformation storeConfigInfo)
public List<HStoreFile> preSelectCompactionForCoprocessor(Collection<HStoreFile> candidates, List<HStoreFile> filesCompacting)
public CompactionRequestImpl selectCompaction(Collection<HStoreFile> candidateFiles, List<HStoreFile> filesCompacting, boolean isUserCompaction, boolean mayUseOffPeak, boolean forceMajor) throws IOException
candidateFiles - 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.IOExceptionprotected abstract CompactionRequestImpl createCompactionRequest(ArrayList<HStoreFile> candidateSelection, boolean tryingMajor, boolean mayUseOffPeak, boolean mayBeStuck) throws IOException
IOExceptionpublic abstract boolean shouldPerformMajorCompaction(Collection<HStoreFile> filesToCompact) throws IOException
shouldPerformMajorCompaction 在类中 CompactionPolicyfilesToCompact - Files to compact. Can be null.IOExceptionpublic long getNextMajorCompactTime(Collection<HStoreFile> filesToCompact)
filesToCompact - public boolean throttleCompaction(long compactionSize)
throttleCompaction 在类中 CompactionPolicycompactionSize - Total size of some compactionpublic abstract boolean needsCompaction(Collection<HStoreFile> storeFiles, List<HStoreFile> filesCompacting)
protected ArrayList<HStoreFile> getCurrentEligibleFiles(ArrayList<HStoreFile> candidateFiles, List<HStoreFile> filesCompacting)
protected ArrayList<HStoreFile> skipLargeFiles(ArrayList<HStoreFile> candidates, boolean mayUseOffpeak)
candidates - pre-filtrateprotected ArrayList<HStoreFile> filterBulk(ArrayList<HStoreFile> candidates)
candidates - pre-filtrateprotected void removeExcessFiles(ArrayList<HStoreFile> candidates, boolean isUserCompaction, boolean isMajorCompaction)
candidates - pre-filtrateprotected ArrayList<HStoreFile> checkMinFilesCriteria(ArrayList<HStoreFile> candidates, int minFiles)
candidates - pre-filtrateCopyright © 2007–2019 The Apache Software Foundation. All rights reserved.