@InterfaceAudience.Private public class StripeCompactionPolicy extends CompactionPolicy
Modifier and Type | Class and Description |
---|---|
static class |
StripeCompactionPolicy.StripeCompactionRequest
Stripe compaction request wrapper.
|
static interface |
StripeCompactionPolicy.StripeInformationProvider
The information about stripes that the policy needs to do its stuff
|
comConf, storeConfigInfo
Constructor and Description |
---|
StripeCompactionPolicy(org.apache.hadoop.conf.Configuration conf,
StoreConfigInformation storeConfigInfo,
StripeStoreConfig config) |
getConf, setConf
public StripeCompactionPolicy(org.apache.hadoop.conf.Configuration conf, StoreConfigInformation storeConfigInfo, StripeStoreConfig config)
public List<StoreFile> preSelectFilesForCoprocessor(StripeCompactionPolicy.StripeInformationProvider si, List<StoreFile> filesCompacting)
public StripeCompactionPolicy.StripeCompactionRequest createEmptyRequest(StripeCompactionPolicy.StripeInformationProvider si, CompactionRequest request)
public StripeStoreFlusher.StripeFlushRequest selectFlush(StripeCompactionPolicy.StripeInformationProvider si, int kvCount)
public StripeCompactionPolicy.StripeCompactionRequest selectCompaction(StripeCompactionPolicy.StripeInformationProvider si, List<StoreFile> filesCompacting, boolean isOffpeak) throws IOException
IOException
public boolean needsCompactions(StripeCompactionPolicy.StripeInformationProvider si, List<StoreFile> filesCompacting)
public boolean isMajorCompaction(Collection<StoreFile> filesToCompact) throws IOException
isMajorCompaction
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
public static long getTotalFileSize(Collection<StoreFile> candidates)
Copyright © 2007-2016 The Apache Software Foundation. All Rights Reserved.