如何将 HBase table 强制到区域服务器

How to force an HBase table to a region server

我有 2 个 Hbase 表,我想将它们中的每一个强制到不同的区域服务器。有没有办法告诉 HBase 这样做?

您可以使用 hbase shell 移动命令将区域移动到另一个区域服务器:

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

更多 shell 命令 here

虽然如果两个表都很大,它们可以在集群中的每个 RegionServer 上都有区域,所以我不确定您要用它完成什么。