Reply
Highlighted
Contributor
Posts: 55
Registered: ‎09-17-2013
Accepted Solution

MutlipleOutputs writing zero records to output file.

I have mapreduce code, in which i have used multipleOutputs.write for writing the output fo my own file convention.

 

I have used following line.

 

multipleOutputs.write(new Text(line), NullWritable.get(),"srini-file");

 

But, i am getting file with srini-file-m-00000 with 0 records in it. However, if i have used context.write, then the output came properly.

Please let me know, if there is any important point i missed in multipleoutputs.

 

 

Posts: 1,903
Kudos: 435
Solutions: 307
Registered: ‎07-31-2013

Re: MutlipleOutputs writing zero records to output file.

Are you ensuring to call multipleOutputs.close() in the cleanup phase? If that is not done, the file won't be closed up, and would be left hanging open for an hour during which you can't see any written data.

If you're already doing that, please share your code here so we can take a look at what may be going wrong.
Contributor
Posts: 55
Registered: ‎09-17-2013

Re: MutlipleOutputs writing zero records to output file.

Thank you Harsh