@InterfaceAudience.Private public class StripeCompactionPolicy extends CompactionPolicy
Modifier and Type | Class and Description |
---|---|
private static class |
StripeCompactionPolicy.BoundaryStripeCompactionRequest
Request for stripe compactor that will cause it to split the source files into several
separate files at the provided boundaries.
|
private static class |
StripeCompactionPolicy.SplitStripeCompactionRequest
Request for stripe compactor that will cause it to split the source files into several
separate files into based on key-value count, as well as file count limit.
|
static class |
StripeCompactionPolicy.StripeCompactionRequest
Stripe compaction request wrapper.
|
static interface |
StripeCompactionPolicy.StripeInformationProvider
The information about stripes that the policy needs to do its stuff
|
Modifier and Type | Field and Description |
---|---|
private StripeStoreConfig |
config |
private static org.slf4j.Logger |
LOG |
private ExploringCompactionPolicy |
stripePolicy |
comConf, storeConfigInfo
Constructor and Description |
---|
StripeCompactionPolicy(org.apache.hadoop.conf.Configuration conf,
StoreConfigInformation storeConfigInfo,
StripeStoreConfig config) |
getConf, setConf
private static final org.slf4j.Logger LOG
private ExploringCompactionPolicy stripePolicy
private StripeStoreConfig config
public StripeCompactionPolicy(org.apache.hadoop.conf.Configuration conf, StoreConfigInformation storeConfigInfo, StripeStoreConfig config)
public List<HStoreFile> preSelectFilesForCoprocessor(StripeCompactionPolicy.StripeInformationProvider si, List<HStoreFile> filesCompacting)
public StripeCompactionPolicy.StripeCompactionRequest createEmptyRequest(StripeCompactionPolicy.StripeInformationProvider si, CompactionRequestImpl request)
public StripeStoreFlusher.StripeFlushRequest selectFlush(CellComparator comparator, StripeCompactionPolicy.StripeInformationProvider si, int kvCount)
public StripeCompactionPolicy.StripeCompactionRequest selectCompaction(StripeCompactionPolicy.StripeInformationProvider si, List<HStoreFile> filesCompacting, boolean isOffpeak) throws IOException
IOException
public boolean needsCompactions(StripeCompactionPolicy.StripeInformationProvider si, List<HStoreFile> filesCompacting)
public boolean shouldPerformMajorCompaction(Collection<HStoreFile> filesToCompact) throws IOException
shouldPerformMajorCompaction
in class CompactionPolicy
filesToCompact
- Files to compact. Can be null.IOException
public boolean throttleCompaction(long compactionSize)
throttleCompaction
in class CompactionPolicy
compactionSize
- Total size of some compactionprotected boolean needsSingleStripeCompaction(StripeCompactionPolicy.StripeInformationProvider si)
si
- StoreFileManager.protected StripeCompactionPolicy.StripeCompactionRequest selectSingleStripeCompaction(StripeCompactionPolicy.StripeInformationProvider si, boolean includeL0, boolean canDropDeletesWithoutL0, boolean isOffpeak) throws IOException
IOException
private List<HStoreFile> selectSimpleCompaction(List<HStoreFile> sfs, boolean allFilesOnly, boolean isOffpeak)
sfs
- Files.allFilesOnly
- Whether a compaction of all-or-none files is needed.private StripeCompactionPolicy.StripeCompactionRequest selectNewStripesCompaction(StripeCompactionPolicy.StripeInformationProvider si)
private StripeCompactionPolicy.StripeCompactionRequest selectExpiredMergeCompaction(StripeCompactionPolicy.StripeInformationProvider si, boolean canDropDeletesNoL0)
private static long getTotalKvCount(Collection<HStoreFile> candidates)
public static long getTotalFileSize(Collection<HStoreFile> candidates)
private Pair<Long,Integer> estimateTargetKvs(Collection<HStoreFile> files, double splitCount)
Copyright © 2007–2019 The Apache Software Foundation. All rights reserved.