@Override
  public void addRegion(HRegion region) {
    this.onlineRegions.put(region.getRegionInfo().getEncodedName(), region);
    configurationManager.registerObserver(region);
  }
For tests, web ui and metrics. This method will only work if HRegionServer is in the same JVM
as client; HRegion cannot be serialized to cross an rpc.
hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java