【问题标题】:HBase region - region server programmatic assignmentHBase 区域 - 区域服务器编程分配
【发布时间】:2017-03-28 22:05:12
【问题描述】:

假设我有 100 个 HBase 节点和几个表 A, B, C,它们的键前面带有 000:099 前缀。表是根据前缀拆分创建的,因此每个表有 100 个区域。

我想为所有行分配前缀:

  • 000 到 node-00,
  • 001 到 node-01,
  • 等等。

想法是在同一台机器上保存具有相同前缀的数据,因为我的典型场景是处理table A,将数据转换并放入table B ,然后处理 table B 几次,进行一些转换和聚合。

我没有看到 docs 中的说明,需要一些关于如何继续的建议。

【问题讨论】:

    标签: java hbase


    【解决方案1】:

    您可以创建一个包含所需区域数的新表。然后在使用 move 命令填充表之前进行手动区域平衡,将区域放入所需的服务器。查看帮助

    hbase(main):004:0> help move
    
    Here is some help for this command:
    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
    Examples:
    
      hbase> move 'ENCODED_REGIONNAME'
      hbase> move 'ENCODED_REGIONNAME', 'SERVER_NAME'
    

    或者您可以尝试使用 HBaseAdmin 来执行此操作,请参阅方法 move。

    【讨论】:

      猜你喜欢
      • 2013-12-02
      • 1970-01-01
      • 2013-07-23
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多