How do i set reducer output name in Hadoop?

99 Views Asked by At

I have a job that will emit 900,000 different outputs. each one of those have to be identified by a specific unique name... that is the "name" I have on the mapOutputKey. How do i do this in map-reduce?

1

There are 1 best solutions below

0
On

You can use MultipleOutputs, in the documentation you will find example that does almost exactly what you need, you just need to replace the generateFileName function to this one:

String generateFileName(K k, V v) {
  return k.toString();
}