You can presplit table at time of creation.
e.g. table 't1' is split into 15 regions in the following example:
hbase(main):002:0> create 't1', 'f1', {NUMREGIONS => 15, SPLITALGO =>
'HexStringSplit'}
0 row(s) in 2.3140 seconds
The regions of the table would be spread evenly across the region servers.
Cheers
On Mon, May 11, 2015 at 3:38 PM, Arun Patel <[email protected]> wrote:
> I have some basic questions on regions.
>
> 1) I have a 10 node HBase cluster. When I create a table in HBase, how
> many regions will be allocated by default? I looked at the HBase Master UI
> and it seems regions are not allocated to all the Regionservers by
> default. How can I allocate the regions in all Region Servers? Basically,
> This distributes the data in a better way If I am using a slated key. My
> requirement is to distribute the data across the cluster using salted
> keys. But, Having few regions is a constraint?
>
> 2) How does the rowkey to region mapping works? In Cassandra, we have a
> concept of assigning token range for each node. Rowkey will be assigned to
> a node based on the token range. How does this work in HBase?
>
> Regards,
> Arun
>