You can configure the blocksize of a column family at table creation or by disabling
and altering an existing table.
These instructions are valid whether or not you use Cloudera Manager to manage your
cluster. To configure the blocksize for a column family:
-
In the HBase shell, type:
hbase> create ‘test_table′,{NAME => ‘test_cf′, BLOCKSIZE => '262144'}
hbase> disable 'test_table'
hbase> alter 'test_table', {NAME => 'test_cf', BLOCKSIZE => '524288'}
hbase> enable 'test_table'
After changing the blocksize, the HFiles will be rewritten during the
next major compaction.
-
To trigger a major compaction, issue the following command in HBase
Shell:
hbase> major_compact 'test_table'
Depending on the size of the table, the major compaction can take some
time and have a performance impact while it is running.