void postAction(BalanceAction action) {
    switch (action.getType()) {
      case NULL:
        break;
      case ASSIGN_REGION:
        AssignRegionAction ar = (AssignRegionAction) action;
        regionMoved(ar.getRegion(), -1, ar.getServer());
        break;
      case MOVE_REGION:
        MoveRegionAction mra = (MoveRegionAction) action;
        regionMoved(mra.getRegion(), mra.getFromServer(), mra.getToServer());
        break;
      case SWAP_REGIONS:
        SwapRegionsAction a = (SwapRegionsAction) action;
        regionMoved(a.getFromRegion(), a.getFromServer(), a.getToServer());
        regionMoved(a.getToRegion(), a.getToServer(), a.getFromServer());
        break;
      case MOVE_BATCH:
        MoveBatchAction mba = (MoveBatchAction) action;
        for (MoveRegionAction moveRegionAction : mba.getMoveActions()) {
          regionMoved(moveRegionAction.getRegion(), moveRegionAction.getFromServer(),
            moveRegionAction.getToServer());
        }
        break;
      default:
        throw new RuntimeException("Uknown action:" + action.getType());
    }
  }
Called once per cluster Action to give the cost function an opportunity to update it's state.
postAction() is always called at least once before cost() is called with the cluster that this
action is performed on.
hbase-balancer/src/main/java/org/apache/hadoop/hbase/master/balancer/CostFunction.java