HBase Web UI上的“其他区域”是什么意思?

时间:2018-10-22 12:12:21

标签: hbase bigdata

我已经合并了群集中表的某些区域,没有发生异常。之后,我在此表的Web UI上找到一列名为“其他区域”的whoes值已更改 enter image description here

有人可以帮忙澄清一下吗?

1 个答案:

答案 0 :(得分:1)

我阅读了源代码,发现另一个区域是那些状态不在{OPEN |离线|分割| FAILED_OPEN | FAILED_CLOSE}。

代码在文件'MasterStatusTmplImpl.java'中:

  Map<RegionState.State, List<HRegionInfo>> tableRegions =
      master.getAssignmentManager().getRegionStates()
        .getRegionByStateOfTable(tableName);
  int openRegionsCount = tableRegions.get(RegionState.State.OPEN).size();
  int offlineRegionsCount = tableRegions.get(RegionState.State.OFFLINE).size();
  int splitRegionsCount = tableRegions.get(RegionState.State.SPLIT).size();
  int failedRegionsCount = tableRegions.get(RegionState.State.FAILED_OPEN).size()
         + tableRegions.get(RegionState.State.FAILED_CLOSE).size();
  int otherRegionsCount = 0;
  for (List<HRegionInfo> list: tableRegions.values()) {
     otherRegionsCount += list.size();
  }
  // now subtract known states
  otherRegionsCount = otherRegionsCount - openRegionsCount
                 - failedRegionsCount - offlineRegionsCount
                 - splitRegionsCount;

据此,当我将某些区域合并为新区域时,旧区域的状态变为MERGED,这将在网络UI中计为“其他区域”

看来,一旦一个地区的州变成合并状态,它就不会再改变了。就像官方文档中显示的图形一样: enter image description here