public void parseConfiguration() throws Exception { Map<String, String> prop = new TreeMap<>(); if (filter.acceptJobConfFile()) { Iterator<Map.Entry<String, String>> iter = configuration.iterator(); while (iter.hasNext()) { String key = iter.next().getKey(); if (included(key) && !excluded(key)) { prop.put(key, configuration.get(key)); } } } // check must-have keys are within prop if (matchMustHaveKeyPatterns(prop)) { JobConfigurationAPIEntity jobConfigurationEntity = new JobConfigurationAPIEntity(); jobConfigurationEntity.setTags(new HashMap<>(baseTags)); jobConfigurationEntity.getTags().put(MRJobTagName.USER.toString(), user); jobConfigurationEntity.getTags().put(MRJobTagName.JOB_ID.toString(), jobId); jobConfigurationEntity.getTags().put(MRJobTagName.JOB_NAME.toString(), jobName); jobConfigurationEntity.getTags().put(MRJobTagName.JOD_DEF_ID.toString(), jobDefId); jobConfigurationEntity.getTags().put(MRJobTagName.JOB_TYPE.toString(), jobType); jobConfigurationEntity.setTimestamp(jobLaunchEventEntity.getTimestamp()); JobConfig jobConfig = new JobConfig(); jobConfig.setConfig(prop); jobConfigurationEntity.setJobConfig(jobConfig); jobConfigurationEntity.setConfigJobName(jobDefId); entityCreated(jobConfigurationEntity); } }
} else if (values.get(Keys.LAUNCH_TIME) != null) { // job launched jobLaunchEventEntity.setTimestamp(Long.valueOf(values.get(Keys.LAUNCH_TIME))); jobLaunchTime = jobLaunchEventEntity.getTimestamp(); jobLaunchEventEntity.getTags().put(MRJobTagName.USER.toString(), user); jobLaunchEventEntity.getTags().put(MRJobTagName.JOB_ID.toString(), jobId); jobExecutionEntity.setStartTime(jobLaunchEventEntity.getTimestamp()); jobExecutionEntity.setEndTime(jobFinishEventEntity.getTimestamp()); jobExecutionEntity.setDurationTime(jobExecutionEntity.getEndTime() - jobExecutionEntity.getStartTime()); jobExecutionEntity.setTimestamp(jobLaunchEventEntity.getTimestamp()); jobExecutionEntity.setSubmissionTime(jobSubmitEventEntity.getTimestamp()); if (values.get(Keys.FAILED_MAPS) != null) {