Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Threaded View
MapReduce >> mail # user >> MR output to a file instead of directory?


Copy link to this message
-
Re: MR output to a file instead of directory?
I'm not sure about the usecase, but if you really care you can use an existing directory (e.g. /) by writing a bit of code to bypass the check for output-dir existence...

By default FIleOutputFormat assumes the output-dir shouldn't exist and will error out during init if it does. You could customize it to not bother to check.

Arun

On Mar 2, 2012, at 4:38 PM, Jianhui Zhang wrote:

> Hi all,
>
> The FileOutputFormat/FileOutputCommitter always treats an output path
> as a directory and write files under it, even if there is only one
> Reducer. Is there any way to configure an OutputFormat to write all
> data into a file?
>
> Thanks,
> James

--
Arun C. Murthy
Hortonworks Inc.
http://hortonworks.com/