The pre-partitioning feature of ApsaraDB for HBase helps you design effective rowkeys to prevent data hot spots. This topic describes how to set pre-partitions for an HBase table.
Configuration method
To set pre-partitions for an HBase table named test, use the following example statement. The table below describes the fields used in the example.
create'test',{NAME => 'f1',COMPRESSION => 'snappy' }, { NUMREGIONS => 50, SPLITALGO => 'HexStringSplit' }Field | Description |
NAME | The column family name of the HBase table. |
COMPRESSION | The data compression format for the HBase table. For more information, see Data compression and encoding. |
NUMREGIONS | The number of regions. Calculate the number of regions based on a storage size of 6 GB to 8 GB per region. For large clusters, increase the number of regions. |
SPLITALGO | The algorithm to split Rowkeys. ApsaraDB for HBase provides three split algorithms. The scenarios for each algorithm are described below:
For more information about how to design Rowkeys, see How to design a Rowkey. |