JobInfo { public Long getAvgMergeTime() { return avgMergeTime; } JobInfo();  JobInfo(Job job); long getNumMaps(); long getNumReduces(); Long getAvgMapTime(); Long getAvgReduceTime(); Long getAvgShuffleTime(); Long getAvgMergeTime(); Integer getFailedReduceAttempts(); Integer getKilledReduceAttempts(); Integer getSuccessfulReduceAttempts(); Integer getFailedMapAttempts(); Integer getKilledMapAttempts(); Integer getSuccessfulMapAttempts(); ArrayList<ConfEntryInfo> getAcls(); int getReducesCompleted(); int getReducesTotal(); int getMapsCompleted(); int getMapsTotal(); String getState(); String getUserName(); String getName(); String getQueueName(); String getId(); long getSubmitTime(); long getStartTime(); String getFormattedStartTimeStr(final DateFormat dateFormat); String getStartTimeStr(); long getFinishTime(); Boolean isUber(); String getDiagnostics();  }
@Test(timeout = 10000) public void testAverageMergeTime() throws IOException { String historyFileName = "job_1329348432655_0001-1329348443227-user-Sleep+job-1329348468601-10-1-SUCCEEDED-default.jhist"; String confFileName = "job_1329348432655_0001_conf.xml"; Configuration conf = new Configuration(); JobACLsManager jobAclsMgr = new JobACLsManager(conf); Path fulleHistoryPath = new Path(TestJobHistoryEntities.class.getClassLoader() .getResource(historyFileName) .getFile()); Path fullConfPath = new Path(TestJobHistoryEntities.class.getClassLoader() .getResource(confFileName) .getFile()); HistoryFileInfo info = mock(HistoryFileInfo.class); when(info.getConfFile()).thenReturn(fullConfPath); when(info.getHistoryFile()).thenReturn(fulleHistoryPath); JobId jobId = MRBuilderUtils.newJobId(1329348432655l, 1, 1); CompletedJob completedJob = new CompletedJob(conf, jobId, fulleHistoryPath, true, "user", info, jobAclsMgr); JobInfo jobInfo = new JobInfo(completedJob); Assert.assertEquals(50L, jobInfo.getAvgMergeTime().longValue()); }