Database Reference
In-Depth Information
The following are the list of getter and setter methods to handle compression
and compaction:
Compression.Algorithm getCompression();
Compression.Algorithm getCompressionType();
void setCompressionType(Compression.Algorithm type);
Compression.Algorithm getCompactionCompression();
Compression.Algorithm getCompactionCompressionType();
void setCompactionCompressionType (Compression.Algorithm type);
Compression.Algorithm getCompactionCompression();
Compression.Algorithm getCompactionCompression();
Compression.Algorithm getCompactionCompressionType();
void setCompactionCompressionType (Compression.Algorithm type);
In HBase, all iles are divided into a smaller number of blocks that are loaded during
a get or scan operation. The HColumnDescriptor class deines the methods to set
the block size where the default value is 64 KB:
int getBlocksize();
HColumnDescriptor setBlocksize(int s);
The preceding command shows the getter and setter methods for the block size of
the storeile/HFile for a column family.
Similar to block size, the HColumnDescriptor class also deines methods to enable/
disable the in-memory block cache, which is used to avoid the frequent disk I/O.
The following methods of an API can be used to change this lag:
boolean isBlockCacheEnabled() : This returns true if caching of the HFile
data type blocks is enabled
void setBlockCacheEnabled(boolean blockCacheEnabled) : This enables
caching for HFile data type blocks
Enabling block cache does not guarantee the persistence of values of the column
family in-memory. By default, the in-memory lag is false and can be modiied
using the following methods:
boolean isInMemory() : This returns true if the HRegionServer level
caching is enabled for all values of the column family.
HColumnDescriptor setInMemory(boolean inMemory) : This enables the
HRegionServer level in-memory caching for the values of the column family.
It returns the "this" instance.
 
Search WWH ::




Custom Search