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
Modifier and TypeFieldDescriptionprivate String
static final String
private final String
private final double
(package private) org.apache.hadoop.conf.Configuration
static final String
Windows older than warm age belong to COLD_WINDOWstatic final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
private final String
private final int
private final long
private final boolean
private final boolean
private static final Class<? extends RatioBasedCompactionPolicy>
private static final Class<? extends CompactionWindowFactory>
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
private long
private String
private static final org.slf4j.Logger
private final float
private final long
private final long
Since all these properties can change online, they are volatileprivate final int
private final long
private int
This one can be updateprivate final float
private final double
private final long
(package private) StoreConfigInformation
private final long
private long
private String
-
Constructor Summary
ConstructorDescriptionCompactionConfiguration
(org.apache.hadoop.conf.Configuration conf, StoreConfigInformation storeConfigInfo) -
Method Summary
Modifier and TypeMethodDescriptiondouble
Returns Ratio used for compactiondouble
Returns Off peak Ratio used for compactionint
long
long
float
long
long
Returns upper bound on file size to be included in minor compactionslong
getMaxCompactSize
(boolean mayUseOffpeak) int
Returns upper bound on number of files to be included in minor compactionslong
Returns lower bound below which compaction is selected without ratio testint
Returns lower bound on number of files to be included in minor compactionsfloat
long
long
Returns ThrottlePoint used for classifying small and large compactionslong
boolean
void
setMinFilesToCompact
(int threshold) Set lower bound on number of files to be included in minor compactionstoString()
boolean
-
Field Details
-
LOG
-
HBASE_HSTORE_COMPACTION_RATIO_KEY
- See Also:
-
HBASE_HSTORE_COMPACTION_RATIO_OFFPEAK_KEY
- See Also:
-
HBASE_HSTORE_COMPACTION_MIN_KEY_OLD
- See Also:
-
HBASE_HSTORE_COMPACTION_MIN_KEY
- See Also:
-
HBASE_HSTORE_COMPACTION_MIN_SIZE_KEY
- See Also:
-
HBASE_HSTORE_COMPACTION_MAX_KEY
- See Also:
-
HBASE_HSTORE_COMPACTION_MAX_SIZE_KEY
- See Also:
-
HBASE_HSTORE_COMPACTION_MAX_SIZE_OFFPEAK_KEY
- See Also:
-
HBASE_HSTORE_OFFPEAK_END_HOUR
- See Also:
-
HBASE_HSTORE_OFFPEAK_START_HOUR
- See Also:
-
HBASE_HSTORE_MIN_LOCALITY_TO_SKIP_MAJOR_COMPACT
- See Also:
-
HBASE_HFILE_COMPACTION_DISCHARGER_THREAD_COUNT
- See Also:
-
DATE_TIERED_MAX_AGE_MILLIS_KEY
- See Also:
-
DATE_TIERED_INCOMING_WINDOW_MIN_KEY
- See Also:
-
COMPACTION_POLICY_CLASS_FOR_DATE_TIERED_WINDOWS_KEY
- See Also:
-
DATE_TIERED_SINGLE_OUTPUT_FOR_MINOR_COMPACTION_KEY
- See Also:
-
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
- See Also:
-
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
- See Also:
-
DATE_TIERED_HOT_WINDOW_STORAGE_POLICY_KEY
- See Also:
-
DATE_TIERED_WARM_WINDOW_AGE_MILLIS_KEY
- See Also:
-
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
-