[ https://issues.apache.org/jira/browse/MAPREDUCE-6579?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15082682#comment-15082682 ]
Akira AJISAKA edited comment on MAPREDUCE-6579 at 1/5/16 9:17 AM: ------------------------------------------------------------------ After YARN-3946, {{JobClient.getFailureInfo()}} returns the application master's diagnostic message. Therefore the following code fails: {code} assertEquals( runningJob.getFailureInfo(),""); {code} I'm thinking the code can be replaced by {code} String diag = runningJob.getFailureInfo(); assertTrue(diag.startsWith(AMState.ACTIVATED) || diag.startsWith(AMState.ASSIGNED)); {code} because the code intend to verify that the job is not failing. By the way, the following javadoc is no longer correct. I'll update this. {code:title=o.a.h.mapreduce.JobStatus} /** * Gets any available info on the reason of failure of the job. * @return diagnostic information on why a job might have failed. */ public synchronized String getFailureInfo() { return this.failureInfo; } {code} Furthermore, I'd like to add a new method {{getDiagnostics}} to {{JobStatus}} and deprecate {{getFailureInfo}} because the method name {{getFailureInfo}} is confusing. I'll create a separate jira for this. was (Author: ajisakaa): After YARN-3946, {{JobClient.getFailureInfo()}} returns the application master's diagnostic message. Therefore the following code fails: {code} assertEquals( runningJob.getFailureInfo(),""); {code} I'm thinking the code can be replaced by {code} String diag = runningJob.getFailureInfo(); assertTrue(diag.startsWith(AMState.ACTIVATED) || diag.startsWith(AMState.ASSIGNED)); {code} because the code intend to verify that the job is not failing. By the way, the following javadoc is no longer correct. I'll update this. {code:title=o.a.h.mapreduce.JobStatus} /** * Gets any available info on the reason of failure of the job. * @return diagnostic information on why a job might have failed. */ public synchronized String getFailureInfo() { return this.failureInfo; } {code} Furthermore, I'd like to add a new method {{getDiagnostics}} to {{JobStatus}} and deprecate {{getFailureInfo}}. I'll create a separate jira for this. > Test failure : TestNetworkedJob > ------------------------------- > > Key: MAPREDUCE-6579 > URL: https://issues.apache.org/jira/browse/MAPREDUCE-6579 > Project: Hadoop Map/Reduce > Issue Type: Bug > Reporter: Rohith Sharma K S > Assignee: Akira AJISAKA > > From > [https://builds.apache.org/job/PreCommit-YARN-Build/9976/artifact/patchprocess/patch-unit-hadoop-mapreduce-project_hadoop-mapreduce-client_hadoop-mapreduce-client-jobclient-jdk1.8.0_66.txt] > TestNetworkedJob are failed intermittently. > {code} > Running org.apache.hadoop.mapred.TestNetworkedJob > Tests run: 5, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 81.131 sec > <<< FAILURE! - in org.apache.hadoop.mapred.TestNetworkedJob > testNetworkedJob(org.apache.hadoop.mapred.TestNetworkedJob) Time elapsed: > 30.55 sec <<< FAILURE! > org.junit.ComparisonFailure: expected:<[[Tue Dec 15 14:02:45 +0000 2015] > Application is Activated, waiting for resources to be assigned for AM. > Details : AM Partition = <DEFAULT_PARTITION> ; Partition Resource = > <memory:8192, vCores:16> ; Queue's Absolute capacity = 100.0 % ; Queue's > Absolute used capacity = 0.0 % ; Queue's Absolute max capacity = 100.0 % ; ]> > but was:<[]> > at org.junit.Assert.assertEquals(Assert.java:115) > at org.junit.Assert.assertEquals(Assert.java:144) > at > org.apache.hadoop.mapred.TestNetworkedJob.testNetworkedJob(TestNetworkedJob.java:174) > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)