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?

有帮助吗?

解决方案

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)

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top