Package org.apache.hadoop.hbase
Enum MemoryCompactionPolicy
- All Implemented Interfaces:
Serializable
,Comparable<MemoryCompactionPolicy>
Enum describing all possible memory compaction policies
-
Enum Constant Summary
Enum ConstantDescriptionAdaptive compaction adapts to the workload.Basic policy applies optimizations which modify the index to a more compacted representation.In addition to compacting the index representation as the basic policy, eager policy eliminates duplication while the data is still in memory (much like the on-disk compaction does after the data is flushed to disk).No memory compaction, when size threshold is exceeded data is flushed to disk -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic MemoryCompactionPolicy
Returns the enum constant of this type with the specified name.static MemoryCompactionPolicy[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
NONE
No memory compaction, when size threshold is exceeded data is flushed to disk -
BASIC
Basic policy applies optimizations which modify the index to a more compacted representation. This is beneficial in all access patterns. The smaller the cells are the greater the benefit of this policy. This is the default policy. -
EAGER
In addition to compacting the index representation as the basic policy, eager policy eliminates duplication while the data is still in memory (much like the on-disk compaction does after the data is flushed to disk). This policy is most useful for applications with high data churn or small working sets. -
ADAPTIVE
Adaptive compaction adapts to the workload. It applies either index compaction or data compaction based on the ratio of duplicate cells in the data.
-
-
Constructor Details
-
MemoryCompactionPolicy
private MemoryCompactionPolicy()
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-