org.apache.hadoop.hbase.regionserver.compactions
Class CompactionPolicy
java.lang.Object
org.apache.hadoop.hbase.regionserver.compactions.CompactionPolicy
- Direct Known Subclasses:
- RatioBasedCompactionPolicy, StripeCompactionPolicy
@InterfaceAudience.Private
public abstract class CompactionPolicy
- extends Object
A compaction policy determines how to select files for compaction,
how to compact them, and how to generate the compacted files.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
comConf
protected CompactionConfiguration comConf
storeConfigInfo
protected StoreConfigInformation storeConfigInfo
CompactionPolicy
public CompactionPolicy(org.apache.hadoop.conf.Configuration conf,
StoreConfigInformation storeConfigInfo)
isMajorCompaction
public abstract boolean isMajorCompaction(Collection<StoreFile> filesToCompact)
throws IOException
- Parameters:
filesToCompact
- Files to compact. Can be null.
- Returns:
- True if we should run a major compaction.
- Throws:
IOException
throttleCompaction
public abstract boolean throttleCompaction(long compactionSize)
- Parameters:
compactionSize
- Total size of some compaction
- Returns:
- whether this should be a large or small compaction
setConf
public void setConf(org.apache.hadoop.conf.Configuration conf)
- Inform the policy that some configuration has been change,
so cached value should be updated it any.
getConf
public CompactionConfiguration getConf()
Copyright © 2007–2016 The Apache Software Foundation. All rights reserved.