List of usage examples for org.apache.hadoop.mapreduce Job getStartTime
public long getStartTime()
From source file:kogiri.common.report.Report.java
License:Open Source License
private String makeText(Job job) { String jobName = job.getJobName(); String jobID = job.getJobID().toString(); String jobStatus;//from ww w . ja va 2 s .com try { jobStatus = job.getJobState().name(); } catch (IOException ex) { jobStatus = "Unknown"; } catch (InterruptedException ex) { jobStatus = "Unknown"; } String startTimeStr; try { startTimeStr = TimeHelper.getTimeString(job.getStartTime()); } catch (Exception ex) { startTimeStr = "Unknown"; } String finishTimeStr; try { finishTimeStr = TimeHelper.getTimeString(job.getFinishTime()); } catch (Exception ex) { finishTimeStr = "Unknown"; } String timeTakenStr; try { timeTakenStr = TimeHelper.getDiffTimeString(job.getStartTime(), job.getFinishTime()); } catch (Exception ex) { timeTakenStr = "Unknown"; } String countersStr; try { countersStr = job.getCounters().toString(); } catch (Exception ex) { countersStr = "Unknown"; } return "Job : " + jobName + "\n" + "JobID : " + jobID + "\n" + "Status : " + jobStatus + "\n" + "StartTime : " + startTimeStr + "\n" + "FinishTime : " + finishTimeStr + "\n" + "TimeTaken : " + timeTakenStr + "\n\n" + countersStr; }
From source file:org.apache.falcon.job.JobCounters.java
License:Apache License
public void obtainJobCounters(Configuration conf, Job job, boolean isDistCp) throws IOException { try {/* w w w. j a v a 2 s. c om*/ long timeTaken = job.getFinishTime() - job.getStartTime(); countersMap.put(ReplicationJobCountersList.TIMETAKEN.getName(), timeTaken); Counters jobCounters = job.getCounters(); parseJob(job, jobCounters, isDistCp); } catch (Exception e) { LOG.info("Exception occurred while obtaining job counters: {}", e); } }