private void cleanUpAndReportFailure(IOException error) throws IOException {
    LOG.warn("Failed to open region {}, will report to master", regionInfo.getRegionNameAsString(),
      error);
    HRegionServer rs = getServer();
    rs.getRegionsInTransitionInRS().remove(regionInfo.getEncodedNameAsBytes(), Boolean.TRUE);
    if (
      !rs.reportRegionStateTransition(new RegionStateTransitionContext(TransitionCode.FAILED_OPEN,
        HConstants.NO_SEQNUM, openProcId, masterSystemTime, regionInfo, initiatingMasterActiveTime))
    ) {
      throw new IOException(
        "Failed to report failed open to master: " + regionInfo.getRegionNameAsString());
    }
  }
Handles opening of a region on a region server.
<p/>
Just done the same thing with the old {@link OpenRegionHandler}, with some modifications on
fencing and retrying. But we need to keep the {@link OpenRegionHandler} as is to keep compatible
with the zk less assignment for 1.x, otherwise it is not possible to do rolling upgrade.
hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/handler/AssignRegionHandler.java