使用 Azure HDInsight 对 Apache HBase 进行故障排除Troubleshoot Apache HBase by using Azure HDInsight

了解处理 Apache Ambari 中的 Apache HBase 有效负载时的最常见问题及其解决方法。Learn about the top issues and their resolutions when working with Apache HBase payloads in Apache Ambari.

如何对多个未分配区域运行 hbck 命令报告?How do I run hbck command reports with multiple unassigned regions?

运行 hbase hbck 命令时,可能会出现的一条常见错误消息是“多个区域未分配,或者区域链中出现漏洞”。A common error message that you might see when you run the hbase hbck command is "multiple regions being unassigned or holes in the chain of regions."

在 HBase Master UI 中,可以看到所有区域服务器中非均衡区域的数目。In the HBase Master UI, you can see the number of regions that are unbalanced across all region servers. 然后,可以运行 hbase hbck 命令查看区域链中的漏洞。Then, you can run hbase hbck command to see holes in the region chain.

漏洞可能是脱机区域造成的,因此请先修复分配问题。Holes might be caused by the offline regions, so fix the assignments first.

若要使未分配的区域恢复正常状态,请完成以下步骤:To bring the unassigned regions back to a normal state, complete the following steps:

  1. 使用 SSH 登录到 HDInsight HBase 群集。Sign in to the HDInsight HBase cluster by using SSH.
  2. 若要与 Apache ZooKeeper shell 进行连接,请运行 hbase zkcli 命令。To connect with the Apache ZooKeeper shell, run the hbase zkcli command.
  3. 运行 rmr /hbase/regions-in-transition 命令或 rmr /hbase-unsecure/regions-in-transition 命令。Run the rmr /hbase/regions-in-transition command or the rmr /hbase-unsecure/regions-in-transition command.
  4. 若要从 hbase zkcli shell 退出,请使用 exit 命令。To exit from the hbase zkcli shell, use the exit command.
  5. 打开 Apache Ambari UI,并重启 Active HBase Master 服务。Open the Apache Ambari UI, and then restart the Active HBase Master service.
  6. 再次运行 hbase hbck 命令(不带任何选项)。Run the hbase hbck command again (without any options). 检查此命令的输出以确保分配了所有区域。Check the output of this command to ensure that all regions are being assigned.

使用 hbck 命令进行区域分配时,如何解决超时问题?How do I fix timeout issues when using hbck commands for region assignments?

问题Issue

使用 hbck 命令时出现超时问题的可能原因是多个区域长时间处于“正在转换”状态。A potential cause for timeout issues when you use the hbck command might be that several regions are in the "in transition" state for a long time. 在 HBase Master UI 中可以看到这些区域显示为脱机。You can see those regions as offline in the HBase Master UI. 由于有大量区域正在尝试进行转换,因此,HBase Master 可能会超时并且无法使那些区域恢复联机。Because a high number of regions are attempting to transition, HBase Master might timeout and be unable to bring those regions back online.

解决步骤Resolution steps

  1. 使用 SSH 登录到 HDInsight HBase 群集。Sign in to the HDInsight HBase cluster by using SSH.
  2. 若要与 Apache ZooKeeper shell 进行连接,请运行 hbase zkcli 命令。To connect with the Apache ZooKeeper shell, run the hbase zkcli command.
  3. 运行 rmr /hbase/regions-in-transitionrmr /hbase-unsecure/regions-in-transition 命令。Run the rmr /hbase/regions-in-transition or the rmr /hbase-unsecure/regions-in-transition command.
  4. 若要退出 hbase zkcli shell,请使用 exit 命令。To exit the hbase zkcli shell, use the exit command.
  5. 在 Ambari UI 中,重启 Active HBase Master 服务。In the Ambari UI, restart the Active HBase Master service.
  6. 再次运行命令 hbase hbck -fixAssignmentsRun the hbase hbck -fixAssignments command again.

后续步骤Next steps

如果你的问题未在本文中列出,或者无法解决问题,请访问以下渠道获取更多支持:If you didn't see your problem or are unable to solve your issue, visit the following channel for more support:

  • 如果需要更多帮助,可以从 Azure 门户提交支持请求。If you need more help, you can submit a support request from the Azure portal. 从菜单栏中选择“支持” ,或打开“帮助 + 支持” 中心。Select Support from the menu bar or open the Help + support hub.