答案 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中计为“其他区域”