Mapreduce sorts on key, since you are sorting on nullwritable you are doing no sorting at all:
outputCollector.collect(NullWritable.get(),value);
Your map output keys should be your inputvalues!
outputCollector.collect(value, NullWritable.get());
Can you give this a try and let us know if it does the trick?
Second remark: Use IntWritable instead of Text otherwise the sorting will be lexicographically!