hadoop-mapreduce-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "stanley shi (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (MAPREDUCE-6039) mapreduce.v2.hs.webapp.dao.TestJobInfo is using old name of job history file
Date Thu, 21 Aug 2014 03:36:33 GMT

    [ https://issues.apache.org/jira/browse/MAPREDUCE-6039?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14104997#comment-14104997
] 

stanley shi commented on MAPREDUCE-6039:
----------------------------------------

Thanks [~jlowe], the name is still valid only for compatibility. Will it be better if we use
the new name and let the designated UT to cover this backwards-compatibility?

> mapreduce.v2.hs.webapp.dao.TestJobInfo is using old name of job history file
> ----------------------------------------------------------------------------
>
>                 Key: MAPREDUCE-6039
>                 URL: https://issues.apache.org/jira/browse/MAPREDUCE-6039
>             Project: Hadoop Map/Reduce
>          Issue Type: Bug
>    Affects Versions: 2.4.1
>            Reporter: stanley shi
>            Priority: Trivial
>
> In the file: org.apache.hadoop.mapreduce.v2.hs.webapp.dao.TestJobInfo.java, there's an
example job history file named "job_1329348432655_0001-1329348443227-user-Sleep+job-1329348468601-10-1-SUCCEEDED-default.jhist";

> This name is no longer valid since the change of MAPREDUCE-5052, which added the "startTime"
of the job to the end of the job history file name, which makes the name should be like: job_1329348432655_0001-1329348443227-user-Sleep+job-1329348468601-10-1-SUCCEEDED-default-1329348448308.jhist
> The code in TestJobInfo.java: {code}
> 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);
>     JobId jobId = MRBuilderUtils.newJobId(1329348432655l, 1, 1);
>     CompletedJob completedJob =
>         new CompletedJob(conf, jobId, fulleHistoryPath, true, "user",
>             info, jobAclsMgr);
>     JobInfo jobInfo = new JobInfo(completedJob);
>     // There are 2 tasks with merge time of 45 and 55 respectively. So average
>     // merge time should be 50.
>     Assert.assertEquals(50L, jobInfo.getAvgMergeTime().longValue());
>   }
> {code}



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Mime
View raw message