You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hbase.apache.org by Baichuan YANG <yb...@gmail.com> on 2016/08/01 22:59:00 UTC

some questions about hbase pre-split

Hi all,

Currently I am working on a data simulation project on which I need to
store huge amount of data into one HBase table. I plan to pre-split the
regions and disable auto-split, and here are my concerns;
1. Assume that originally I pre-split the table into 1000 regions. In the
future if we need to split the table to 2000 regions or more, how to
archive that (or just tell me what is the hbase shell command or Java APIs)?
2. If I re-split the table as I describe above, how HBase deal with the
data that have been already saved into table? Will HBase automatically
redistribute the data? Or I have to reload the data again?

Regards,
BC Y

Re: some questions about hbase pre-split

Posted by Ted Yu <yu...@gmail.com>.
For #1, please take a look at split.rb :

Split entire table or pass a region to split individual region.  With the
second parameter, you can specify an explicit split key for the region.
Examples:
    split 'tableName'
    split 'namespace:tableName'
    split 'regionName' # format: 'tableName,startKey,id'
    split 'tableName', 'splitKey'
    split 'regionName', 'splitKey'

For #2, hbase will redistribute the data (of parent region into daughter
regions).

Cheers

On Mon, Aug 1, 2016 at 3:59 PM, Baichuan YANG <yb...@gmail.com> wrote:

> Hi all,
>
> Currently I am working on a data simulation project on which I need to
> store huge amount of data into one HBase table. I plan to pre-split the
> regions and disable auto-split, and here are my concerns;
> 1. Assume that originally I pre-split the table into 1000 regions. In the
> future if we need to split the table to 2000 regions or more, how to
> archive that (or just tell me what is the hbase shell command or Java
> APIs)?
> 2. If I re-split the table as I describe above, how HBase deal with the
> data that have been already saved into table? Will HBase automatically
> redistribute the data? Or I have to reload the data again?
>
> Regards,
> BC Y
>