First-time users of ApsaraDB for HBase may be unfamiliar with the service. These users may fail to specify the number of regions when creating tables, as well as use inappropriate rowkey design, which cause hotspotting.

The following statement is the most commonly used statement for creating a table:

create 't3',{NAME => 'f1',COMPRESSION => 'snappy' }, { NUMREGIONS => 50, SPLITALGO => 'HexStringSplit' }

  • The NUMREGIONS parameter specifies the number of regions. Typically, each region should be between 6 and 8 GB. If you have a large cluster, we recommend that you increase the number of regions based on the recommended region size.
  • The SPLITALGO parameter indicates the split algorithm used to split rowkeys. ApsaraDB for HBase supports three pre-split algorithms: HexStringSplit, DecimalStringSplit, and UniformSplit.

    Use scenarios for where each split algorithm is used:

    • HexStringSplit: The rowkey is prefixed with a hexadecimal string.
    • DecimalStringSplit: The rowkey is prefixed with a decimal string.
    • UniformSplit: The prefix of the rowkey has no particular pattern.

    For more information about the rowkey, see Rowkey design.

  • For more information about the compression algorithms, see Data compression and encoding.