Question

I am writing a hadoop application whose final output is a bmp image. I change the output format to byte, here is my question: what will the reducer output order be if I set the output key being NullWritable?

Was it helpful?

Solution

The output key type of your reducer has no affect on the ordering of your reducer output - that's controlled by the reducer input key, and its natural ordering via the keys compareTo method or the raw comparator if configured.

So the order will be the same order by which records are processed by your reducer (unless you reducer is maintaining state between keys / values and flushing this state on a regular basis)

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top