[ https://issues.apache.org/jira/browse/HADOOP-4927?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12670314#action_12670314 ] Jothi Padmanabhan commented on HADOOP-4927: ------------------------------------------- So, if I understand this correctly, we have new WrapperOutputFormat class {code} LazyOutputFormat { LazyOutputFormat (OutputFormat rawOF) { this.rawOutputFormat = rawOF; } getRecordWriter(...) { return new LazyRecordWriter(...) } } {code} Users will then do {code} job.setOutputFormat(new LazyOutputFormat(actualOutputFormat)); {code} The other option would be {code} FileOutputFormat.setLazy(true); JobConf::getOutputFormat() { OutputFormat o = getOutputFormat(); if (o.instanceof FileOutputFormat && lazyFlag) { return new LazyOutputFormat(0); } else { return o; } } {code} > Part files on the output filesystem are created irrespective of whether the corresponding task has anything to write there > -------------------------------------------------------------------------------------------------------------------------- > > Key: HADOOP-4927 > URL: https://issues.apache.org/jira/browse/HADOOP-4927 > Project: Hadoop Core > Issue Type: New Feature > Components: mapred > Reporter: Devaraj Das > Assignee: Jothi Padmanabhan > Fix For: 0.21.0 > > Attachments: hadoop-4927-v1.patch, hadoop-4927-v2.patch, hadoop-4927.patch > > > When OutputFormat.getRecordWriter is invoked, a part file is created on the output filesystem. But the created RecordWriter is not used until the OutputCollector.collect call is made by the task (user's code). This results in empty part files even if the OutputCollector.collect is never invoked by the corresponding tasks. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.