r0hini commented on code in PR #339: URL: https://github.com/apache/tez/pull/339#discussion_r1523912700
########## tez-mapreduce/src/test/java/org/apache/tez/mapreduce/output/TestMROutput.java: ########## @@ -131,6 +133,26 @@ public void testMergeConfig() throws Exception { assertEquals("base-value", mergedConf.get("base-key")); } + @Test + public void testParentJobIDSet() throws Exception { + Configuration conf = new Configuration(); + conf.setBoolean(MRConfig.IS_MAP_PROCESSOR, true); + DataSinkDescriptor dataSink = MROutput + .createConfigBuilder(conf, TextOutputFormat.class, + tmpDir.getPath()) + .build(); + + OutputContext outputContext = createMockOutputContext(dataSink.getOutputDescriptor().getUserPayload(), + new Configuration(false)); + MROutput output = new MROutput(outputContext, 2); + output.initialize(); + String invalidJobID = "invalid default"; + String parentJobID = output.jobConf.get(MRJobConfig.MR_PARENT_JOB_ID, invalidJobID); + assertNotEquals(parentJobID,invalidJobID); + assertNotEquals(output.jobConf.get(org.apache.hadoop.mapred.JobContext.TASK_ATTEMPT_ID),parentJobID); Review Comment: Fix code formatting. space after , -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@tez.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org