timeStamp, Constants.REDUCE_COUNT_RATIO, new double[]{entity.getNumTotalReduces(), 1.0 * entity.getNumFailedReduces() / entity.getNumTotalReduces()}, tags));
@Override public void jobEntityCreated(JobBaseAPIEntity entity) throws Exception { if (entity instanceof TaskExecutionAPIEntity) { info.getTasksMap().put(entity.getTags().get(TASK_ID.toString()), (TaskExecutionAPIEntity) entity); } else if (entity instanceof TaskAttemptExecutionAPIEntity) { info.getCompletedTaskAttemptsMap().put(entity.getTags().get(TASK_ATTEMPT_ID.toString()), (TaskAttemptExecutionAPIEntity) entity); } else if (entity instanceof JobExecutionAPIEntity) { JobExecutionAPIEntity jobExecutionAPIEntity = (JobExecutionAPIEntity) entity; info.setCurrentState(jobExecutionAPIEntity.getCurrentState()); info.setStartTime(jobExecutionAPIEntity.getStartTime()); info.setEndTime(jobExecutionAPIEntity.getEndTime()); info.setDurationTime(jobExecutionAPIEntity.getDurationTime()); info.setUserId(jobExecutionAPIEntity.getTags().get(MRJobTagName.USER.toString())); info.setJobId(jobExecutionAPIEntity.getTags().get(MRJobTagName.JOB_ID.toString())); info.setJobDefId(jobExecutionAPIEntity.getTags().get(MRJobTagName.JOD_DEF_ID.toString())); info.setSiteId(jobExecutionAPIEntity.getTags().get(MRJobTagName.SITE.toString())); info.setJobName(jobExecutionAPIEntity.getTags().get(MRJobTagName.JOB_NAME.toString())) ; info.setJobQueueName(jobExecutionAPIEntity.getTags().get(MRJobTagName.JOB_QUEUE.toString())); info.setJobType(jobExecutionAPIEntity.getTags().get(MRJobTagName.JOB_TYPE.toString())); info.setFinishedMaps(jobExecutionAPIEntity.getNumFinishedMaps()); info.setFinishedReduces(jobExecutionAPIEntity.getNumFinishedReduces()); info.setFailedReduces(jobExecutionAPIEntity.getNumFailedReduces()); info.setFailedMaps(jobExecutionAPIEntity.getNumFailedMaps()); info.setTotalMaps(jobExecutionAPIEntity.getNumTotalMaps()); info.setTotalReduces(jobExecutionAPIEntity.getNumTotalReduces()); info.setProgress(100); info.setTrackingUrl(((JobExecutionAPIEntity) entity).getTrackingUrl()); } }