Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to force an HBase table to a region server

I have 2 Hbase tables and I want to force each of them to a different region server. Is there a way to tell HBase to do this?

like image 558
yonigo Avatar asked Dec 24 '22 01:12

yonigo


1 Answers

You can move a region to another region server using hbase shell move command:

hbase> move ‘ENCODED_REGIONNAME’, ‘SERVER_NAME’

Move a region. Optionally specify target regionserver else we choose one at random. NOTE: You pass the encoded region name, not the region name so this command is a little different to the others. The encoded region name is the hash suffix on region names: e.g. if the region name were TestTable,0094429456,1289497600452.527db22f95c8a9e0116f0cc13c680396. then the encoded region name portion is 527db22f95c8a9e0116f0cc13c680396 A server name is its host, port plus startcode. For example: host187.example.com,60020,1289493121758

More shell commands here

Though if both tables are large they can have regions on every RegionServer in a cluster, so I'm not sure what you are going to accomplish with that.

like image 108
MaxNevermind Avatar answered Jan 03 '23 09:01

MaxNevermind