*/
@SuppressWarnings("unchecked")
private JSONObject reRunCoordinatorActions(HttpServletRequest request, HttpServletResponse response,
Configuration conf) throws XServletException {
JSONObject json = new JSONObject();
CoordinatorEngine coordEngine = Services.get().get(CoordinatorEngineService.class).getCoordinatorEngine(getUser(request),
getAuthToken(request));
String jobId = getResourceName(request);
String rerunType = request.getParameter(RestConstants.JOB_COORD_RERUN_TYPE_PARAM);
String scope = request.getParameter(RestConstants.JOB_COORD_RERUN_SCOPE_PARAM);
String refresh = request.getParameter(RestConstants.JOB_COORD_RERUN_REFRESH_PARAM);
String noCleanup = request.getParameter(RestConstants.JOB_COORD_RERUN_NOCLEANUP_PARAM);
XLog.getLog(getClass()).info(
"Rerun coordinator for jobId=" + jobId + ", rerunType=" + rerunType + ",scope=" + scope + ",refresh="
+ refresh + ", noCleanup=" + noCleanup);
try {
CoordinatorActionInfo coordInfo = coordEngine.reRun(jobId, rerunType, scope, Boolean.valueOf(refresh),
Boolean.valueOf(noCleanup));
List<CoordinatorActionBean> actions = coordInfo.getCoordActions();
json.put(JsonTags.COORDINATOR_ACTIONS, CoordinatorActionBean.toJSONArray(actions));
}
catch (BaseEngineException ex) {