You could use a custom Partitioner
for this purpose.
Given the number of reducers n
you can emit your wordcount n
times with the keys 1
, 2
, ... n
in your mapper. A custom Partitioner
class will ensure, that reducer i
gets only values with key i
.