Don E
Don E

Reputation: 241

How do i set reducer output name in Hadoop?

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?

Upvotes: 0

Views: 94

Answers (1)

Aleksei Shestakov
Aleksei Shestakov

Reputation: 2538

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();
}

Upvotes: 1

Related Questions