What does the 'other regions' mean on hbase web UI?

Viewed 808

I have merged some regions of a table in my cluster, no exception occured. After this I found on the web UI of this table there were a column named 'other regions' whoes value had changed enter image description here

Can someone help clarify this?

1 Answers

I read the source code and found the other region is those regions whose states are not in {OPEN | OFFLINE | SPLIT | FAILED_OPEN | FAILED_CLOSE}.

The code is in file '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;

According to this, When I merged some regions into new regions, the old regions' states became into MERGED, which would be counted into 'other region' on the web UI

It seems that once a region's state becomes into MERGED, it won't changed anymore. Just like the graph presented in the official doc: enter image description here

Related