2

I have a reducer script that need generate a bunch of xml files. I want to set the file name programatically using reducer key. I'm using MultipleOutputs to accomplish that as follows.

MultipleOutputs mos = new MultipleOutputs(context);
mos.write(new Text(key), new Text(output), key + ".xml");

But the output filenames are like key.xml-r-00000. How to remove -r-* part from the filename so that it will be simply key.xml?

pkgajulapalli
  • 1,066
  • 3
  • 20
  • 44

1 Answers1

2

Here -r-0000 shows that it is generated from reducer.We can not change it, If you want your customize file name, write a code after generation of these file to change the file name.

Manish Pansari
  • 371
  • 4
  • 9