@Override
  protected void checkTransition(RegionStateNode regionNode, TransitionCode transitionCode,
    long openSeqNum) throws UnexpectedStateException {
    switch (transitionCode) {
      case OPENED:
        if (openSeqNum < 0) {
          throw new UnexpectedStateException("Received report unexpected " + TransitionCode.OPENED
            + " transition openSeqNum=" + openSeqNum + ", " + regionNode + ", proc=" + this);
        }
        break;
      case FAILED_OPEN:
        break;
      default:
        throw new UnexpectedStateException(
          "Received report unexpected " + transitionCode + " transition, "
            + regionNode.toShortString() + ", " + this + ", expected OPENED or FAILED_OPEN.");
    }
  }
The remote procedure used to open a region.
hbase-server/src/main/java/org/apache/hadoop/hbase/master/assignment/OpenRegionProcedure.java