1

I am writing Orc files using MultipleOutputs format to create a custom file name. I am setting the Driver as below

MultipleOutputs.addNamedOutput(job, "MyPrefix", OrcNewOutputFormat.class, NullWritable.class, Writable.class);

In Reducer as below

setup:

_multipleOutputs = new MultipleOutputs<NullWritable, Writable>(context);

Reduce method:

_multipleOutputs.write("MyPrefix", NullWritable.get(), row);

cleanup method:

_multipleOutputs.close();

Though for files having data it generates with prefix "MyPrefix", but is also generating part-00000 file having no record.

Please let me know how can I stop reducer generating this empty file with name part-00000.

GregP
  • 143
  • 12
agarwal_achhnera
  • 2,582
  • 9
  • 55
  • 84
  • This is because `MultipleOutputs` acts as a "byside" output channel. If I recall correctly, you can disable "normal" output channel by setting output format to `NullOutputFormat`. – gudok Mar 05 '19 at 09:06

0 Answers0