@InterfaceAudience.Private public class FIFOCompactionPolicy extends ExploringCompactionPolicy
Modifier and Type | Field and Description |
---|---|
private static org.apache.commons.logging.Log |
LOG |
comConf, storeConfigInfo
Constructor and Description |
---|
FIFOCompactionPolicy(org.apache.hadoop.conf.Configuration conf,
StoreConfigInformation storeConfigInfo) |
Modifier and Type | Method and Description |
---|---|
private Collection<StoreFile> |
getExpiredStores(Collection<StoreFile> files,
Collection<StoreFile> filesCompacting) |
private boolean |
hasExpiredStores(Collection<StoreFile> files) |
private boolean |
isEmptyStoreFile(StoreFile sf)
The FIFOCompactionPolicy only choose those TTL expired HFiles as the compaction candidates.
|
boolean |
isMajorCompaction(Collection<StoreFile> filesToCompact) |
boolean |
needsCompaction(Collection<StoreFile> storeFiles,
List<StoreFile> filesCompacting) |
CompactionRequest |
selectCompaction(Collection<StoreFile> candidateFiles,
List<StoreFile> filesCompacting,
boolean isUserCompaction,
boolean mayUseOffPeak,
boolean forceMajor) |
applyCompactionPolicy, applyCompactionPolicy
getNextMajorCompactTime, preSelectCompactionForCoprocessor, throttleCompaction
getConf, setConf
public FIFOCompactionPolicy(org.apache.hadoop.conf.Configuration conf, StoreConfigInformation storeConfigInfo)
public CompactionRequest selectCompaction(Collection<StoreFile> candidateFiles, List<StoreFile> filesCompacting, boolean isUserCompaction, boolean mayUseOffPeak, boolean forceMajor) throws IOException
selectCompaction
in class RatioBasedCompactionPolicy
candidateFiles
- candidate files, ordered from oldest to newest. All files in store.IOException
public boolean isMajorCompaction(Collection<StoreFile> filesToCompact) throws IOException
isMajorCompaction
in class RatioBasedCompactionPolicy
filesToCompact
- Files to compact. Can be null.IOException
public boolean needsCompaction(Collection<StoreFile> storeFiles, List<StoreFile> filesCompacting)
needsCompaction
in class RatioBasedCompactionPolicy
private boolean isEmptyStoreFile(StoreFile sf)
private boolean hasExpiredStores(Collection<StoreFile> files)
private Collection<StoreFile> getExpiredStores(Collection<StoreFile> files, Collection<StoreFile> filesCompacting)
Copyright © 2007–2019 The Apache Software Foundation. All rights reserved.