0
votes

I know the HBase system is consist of many regions.

1st region is [null, endKey)

2nd region is [startKey, endKey)

..

Last region is [startKey, null)

And all the startKey & endKey are in ascending order!

Here is my question:

If I have 2 regions in the table:

[0 - 100),

[100, null)

When I insert a rowkey 2000000, will the system create a new region or just assign this rowkey to the 2nd region(last one)?

If the rowkey is assigned to the second region. Does it mean the range for 2nd Region is [100, 2000000+). Then the 2nd region will be very large, and perhaps very hot.

Otherwise, if a new region is created, what is the endkey for 2nd region?

Thanks so much!

Waiting on line!

1
It is assigned to the last region. - phs

1 Answers

0
votes

Regions are split when they are too large. Or if you manually split them. The range of the region is irrelevant. In your example, the second region is the same size as the first, plus a single extra entry, so there is no reason for HBase to automatically split it.