@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<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
public static long getTotalFileSize(Collection<HStoreFile> candidates)
Copyright © 2007–2019 Cloudera. All rights reserved.