Class CompactionConfiguration
java.lang.Object
org.apache.hadoop.hbase.regionserver.compactions.CompactionConfiguration
Compaction configuration for a particular instance of HStore. Takes into account both global settings and ones set on the column family/store. Control knobs for default compaction algorithm:
maxCompactSize - upper bound on file size to be included in minor compactions minCompactSize - lower bound below which compaction is selected without ratio test minFilesToCompact - lower bound on number of files in any minor compaction maxFilesToCompact - upper bound on number of files in any minor compaction compactionRatio - Ratio used for compaction minLocalityToForceCompact - Locality threshold for a store file to major compact (HBASE-11195)
Set parameter as "hbase.hstore.compaction.<attribute>"-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate Stringstatic final Stringprivate final Stringprivate final double(package private) org.apache.hadoop.conf.Configurationstatic final StringWindows older than warm age belong to COLD_WINDOWstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringprivate final Stringprivate final intprivate final longprivate final booleanprivate final booleanprivate static final Class<? extends RatioBasedCompactionPolicy>private static final Class<? extends CompactionWindowFactory>static final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringprivate longprivate Stringprivate static final org.slf4j.Loggerprivate final floatprivate final longprivate final longSince all these properties can change online, they are volatileprivate final intprivate final longprivate intThis one can be updateprivate final floatprivate final doubleprivate final long(package private) StoreConfigInformationprivate final longprivate longprivate String -
Constructor Summary
ConstructorsConstructorDescriptionCompactionConfiguration(org.apache.hadoop.conf.Configuration conf, StoreConfigInformation storeConfigInfo) -
Method Summary
Modifier and TypeMethodDescriptiondoubleReturns Ratio used for compactiondoubleReturns Off peak Ratio used for compactionintlonglongfloatlonglongReturns upper bound on file size to be included in minor compactionslonggetMaxCompactSize(boolean mayUseOffpeak) intReturns upper bound on number of files to be included in minor compactionslongReturns lower bound below which compaction is selected without ratio testintReturns lower bound on number of files to be included in minor compactionsfloatlonglongReturns ThrottlePoint used for classifying small and large compactionslongbooleanvoidsetMinFilesToCompact(int threshold) Set lower bound on number of files to be included in minor compactionstoString()boolean
-
Field Details
-
LOG
-
HBASE_HSTORE_COMPACTION_RATIO_KEY
-
HBASE_HSTORE_COMPACTION_RATIO_OFFPEAK_KEY
-
HBASE_HSTORE_COMPACTION_MIN_KEY_OLD
-
HBASE_HSTORE_COMPACTION_MIN_KEY
-
HBASE_HSTORE_COMPACTION_MIN_SIZE_KEY
-
HBASE_HSTORE_COMPACTION_MAX_KEY
-
HBASE_HSTORE_COMPACTION_MAX_SIZE_KEY
-
HBASE_HSTORE_COMPACTION_MAX_SIZE_OFFPEAK_KEY
-
HBASE_HSTORE_OFFPEAK_END_HOUR
-
HBASE_HSTORE_OFFPEAK_START_HOUR
-
HBASE_HSTORE_MIN_LOCALITY_TO_SKIP_MAJOR_COMPACT
-
HBASE_HFILE_COMPACTION_DISCHARGER_THREAD_COUNT
-
DATE_TIERED_MAX_AGE_MILLIS_KEY
-
DATE_TIERED_INCOMING_WINDOW_MIN_KEY
-
COMPACTION_POLICY_CLASS_FOR_DATE_TIERED_WINDOWS_KEY
-
DATE_TIERED_SINGLE_OUTPUT_FOR_MINOR_COMPACTION_KEY
-
DEFAULT_COMPACTION_POLICY_CLASS_FOR_DATE_TIERED_WINDOWS
private static final Class<? extends RatioBasedCompactionPolicy> DEFAULT_COMPACTION_POLICY_CLASS_FOR_DATE_TIERED_WINDOWS -
DATE_TIERED_COMPACTION_WINDOW_FACTORY_CLASS_KEY
-
DEFAULT_DATE_TIERED_COMPACTION_WINDOW_FACTORY_CLASS
private static final Class<? extends CompactionWindowFactory> DEFAULT_DATE_TIERED_COMPACTION_WINDOW_FACTORY_CLASS -
DATE_TIERED_STORAGE_POLICY_ENABLE_KEY
- See Also:
-
DATE_TIERED_HOT_WINDOW_AGE_MILLIS_KEY
-
DATE_TIERED_HOT_WINDOW_STORAGE_POLICY_KEY
- See Also:
-
DATE_TIERED_WARM_WINDOW_AGE_MILLIS_KEY
-
DATE_TIERED_WARM_WINDOW_STORAGE_POLICY_KEY
- See Also:
-
DATE_TIERED_COLD_WINDOW_STORAGE_POLICY_KEY
Windows older than warm age belong to COLD_WINDOW- See Also:
-
conf
org.apache.hadoop.conf.Configuration conf -
storeConfigInfo
-
offPeakCompactionRatio
-
maxCompactSize
Since all these properties can change online, they are volatile -
offPeakMaxCompactSize
-
minCompactSize
-
minFilesToCompact
This one can be update -
maxFilesToCompact
-
compactionRatio
-
throttlePoint
-
majorCompactionPeriod
-
majorCompactionJitter
-
minLocalityToForceCompact
-
dateTieredMaxStoreFileAgeMillis
-
dateTieredIncomingWindowMin
-
compactionPolicyForDateTieredWindow
-
dateTieredSingleOutputForMinorCompaction
-
dateTieredCompactionWindowFactory
-
dateTieredStoragePolicyEnable
-
hotWindowAgeMillis
-
warmWindowAgeMillis
-
hotWindowStoragePolicy
-
warmWindowStoragePolicy
-
coldWindowStoragePolicy
-
-
Constructor Details
-
CompactionConfiguration
CompactionConfiguration(org.apache.hadoop.conf.Configuration conf, StoreConfigInformation storeConfigInfo)
-
-
Method Details
-
toString
-
getMinCompactSize
Returns lower bound below which compaction is selected without ratio test -
getMaxCompactSize
Returns upper bound on file size to be included in minor compactions -
getMinFilesToCompact
Returns lower bound on number of files to be included in minor compactions -
setMinFilesToCompact
Set lower bound on number of files to be included in minor compactions- Parameters:
threshold- value to set to
-
getMaxFilesToCompact
Returns upper bound on number of files to be included in minor compactions -
getCompactionRatio
Returns Ratio used for compaction -
getCompactionRatioOffPeak
Returns Off peak Ratio used for compaction -
getThrottlePoint
Returns ThrottlePoint used for classifying small and large compactions -
getMajorCompactionPeriod
- Returns:
- Major compaction period from compaction. Major compactions are selected periodically according to this parameter plus jitter
-
getMajorCompactionJitter
- Returns:
- Major the jitter fraction, the fraction within which the major compaction period is randomly chosen from the majorCompactionPeriod in each store.
-
getMinLocalityToForceCompact
- Returns:
- Block locality ratio, the ratio at which we will include old regions with a single store file for major compaction. Used to improve block locality for regions that haven't had writes in a while but are still being read.
-
getOffPeakMaxCompactSize
-
getMaxCompactSize
-
getDateTieredMaxStoreFileAgeMillis
-
getDateTieredIncomingWindowMin
-
getCompactionPolicyForDateTieredWindow
-
useDateTieredSingleOutputForMinorCompaction
-
getDateTieredCompactionWindowFactory
-
isDateTieredStoragePolicyEnable
-
getHotWindowAgeMillis
-
getWarmWindowAgeMillis
-
getHotWindowStoragePolicy
-
getWarmWindowStoragePolicy
-
getColdWindowStoragePolicy
-