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
?