private void closeRegion(MasterProcedureEnv env, RegionStateNode regionNode) throws IOException { if (regionNode.isInState(State.OPEN, State.CLOSING, State.MERGING, State.SPLITTING)) { // this is the normal case env.getAssignmentManager().regionClosing(regionNode); addChildProcedure( new CloseRegionProcedure(getRegion(), regionNode.getRegionLocation(), assignCandidate)); setNextState(RegionStateTransitionState.REGION_STATE_TRANSITION_CONFIRM_CLOSED); } else { forceNewPlan = true; regionNode.setRegionLocation(null); setNextState(RegionStateTransitionState.REGION_STATE_TRANSITION_GET_ASSIGN_CANDIDATE); } }