private static JobHistoryParser.JobInfo createJobInfo2() { JobHistoryParser.JobInfo job = new JobHistoryParser.JobInfo(); job.submitTime = 1317928501754L; job.finishTime = job.submitTime + 15000; job.jobid = JobID.forName("job_1317928501754_0001"); job.username = "test"; job.jobname = "Dupe counter output"; job.jobQueueName = "root.test"; job.jobConfPath = "/tmp/job.xml"; job.launchTime = job.submitTime + 1000; job.totalMaps = 1; job.totalReduces = 0; job.failedMaps = 0; job.failedReduces = 0; job.succeededMaps = 1; job.succeededReduces = 0; job.jobStatus = JobStatus.State.SUCCEEDED.name(); job.totalCounters = createDeprecatedCounters(); job.mapCounters = createDeprecatedCounters(); job.reduceCounters = createDeprecatedCounters(); job.tasksMap = new HashMap<>(); addTaskInfo(job, TaskType.JOB_SETUP, 1, TaskStatus.State.SUCCEEDED); addTaskInfo(job, TaskType.MAP, 2, TaskStatus.State.SUCCEEDED); addTaskInfo(job, TaskType.JOB_CLEANUP, 3, TaskStatus.State.SUCCEEDED); return job; }
private static JobHistoryParser.JobInfo createJobInfo() { JobHistoryParser.JobInfo job = new JobHistoryParser.JobInfo(); job.submitTime = 1317928501754L; job.finishTime = job.submitTime + 15000;
/** * Parse the entire history file and populate the JobInfo object * The first invocation will populate the object, subsequent calls * will return the already parsed object. * The input stream is closed on return * @return The populated jobInfo object * @throws IOException */ public synchronized JobInfo parse() throws IOException { if (info != null) { return info; } EventReader reader = new EventReader(in); HistoryEvent event; info = new JobInfo(); try { while ((event = reader.getNextEvent()) != null) { handleEvent(event); } } finally { in.close(); } return info; }
/** * Only used for unit tests. */ @Private public synchronized JobInfo parse(EventReader reader) throws IOException { if (info != null) { return info; } info = new JobInfo(); parse(reader, this); return info; }
/** * Only used for unit tests. */ @Private public synchronized JobInfo parse(EventReader reader) throws IOException { if (info != null) { return info; } info = new JobInfo(); parse(reader, this); return info; }
/** * Only used for unit tests. */ @Private public synchronized JobInfo parse(EventReader reader) throws IOException { if (info != null) { return info; } info = new JobInfo(); parse(reader, this); return info; }
/** * Only used for unit tests. */ @Private public synchronized JobInfo parse(EventReader reader) throws IOException { if (info != null) { return info; } info = new JobInfo(); parse(reader, this); return info; }