@Override public void call(RemotingCommand responseCommand) { if (responseCommand == null) { response.setFailedJobs(jobs); response.setSuccess(false); response.setMsg("Submit Job failed: JobTracker is broken"); LOGGER.warn("Submit Job failed: {}, {}", jobs, "JobTracker is broken"); return; } if (JobProtos.ResponseCode.JOB_RECEIVE_SUCCESS.code() == responseCommand.getCode()) { if (LOGGER.isDebugEnabled()) { LOGGER.debug("Submit Job success: {}", jobs); } response.setSuccess(true); return; } // 失败的job JobSubmitResponse jobSubmitResponse = responseCommand.getBody(); response.setFailedJobs(jobSubmitResponse.getFailedJobs()); response.setSuccess(false); response.setCode(JobProtos.ResponseCode.valueOf(responseCommand.getCode()).name()); response.setMsg("Submit Job failed: " + responseCommand.getRemark() + " " + jobSubmitResponse.getMsg()); LOGGER.warn("Submit Job failed: {}, {}, {}", jobs, responseCommand.getRemark(), jobSubmitResponse.getMsg()); } };
@Override public void call(RemotingCommand responseCommand) { if (responseCommand == null) { response.setFailedJobs(jobs); response.setSuccess(false); response.setMsg("Submit Job failed: JobTracker is broken"); LOGGER.warn("Submit Job failed: {}, {}", jobs, "JobTracker is broken"); return; } if (JobProtos.ResponseCode.JOB_RECEIVE_SUCCESS.code() == responseCommand.getCode()) { if (LOGGER.isDebugEnabled()) { LOGGER.debug("Submit Job success: {}", jobs); } response.setSuccess(true); return; } // 失败的job JobSubmitResponse jobSubmitResponse = responseCommand.getBody(); response.setFailedJobs(jobSubmitResponse.getFailedJobs()); response.setSuccess(false); response.setCode(JobProtos.ResponseCode.valueOf(responseCommand.getCode()).name()); response.setMsg("Submit Job failed: " + responseCommand.getRemark() + " " + jobSubmitResponse.getMsg()); LOGGER.warn("Submit Job failed: {}, {}, {}", jobs, responseCommand.getRemark(), jobSubmitResponse.getMsg()); } };
@Override public void call(RemotingCommand responseCommand) { if (responseCommand == null) { response.setFailedJobs(jobs); response.setSuccess(false); response.setMsg("Submit Job failed: JobTracker is broken"); LOGGER.warn("Submit Job failed: {}, {}", jobs, "JobTracker is broken"); return; } if (JobProtos.ResponseCode.JOB_RECEIVE_SUCCESS.code() == responseCommand.getCode()) { if (LOGGER.isDebugEnabled()) { LOGGER.debug("Submit Job success: {}", jobs); } response.setSuccess(true); return; } // 失败的job JobSubmitResponse jobSubmitResponse = responseCommand.getBody(); response.setFailedJobs(jobSubmitResponse.getFailedJobs()); response.setSuccess(false); response.setCode(JobProtos.ResponseCode.valueOf(responseCommand.getCode()).name()); response.setMsg("Submit Job failed: " + responseCommand.getRemark() + " " + jobSubmitResponse.getMsg()); LOGGER.warn("Submit Job failed: {}, {}, {}", jobs, responseCommand.getRemark(), jobSubmitResponse.getMsg()); } };