i had wrote a mapred job with OutputKeyClass IntWritable. But the
keys are not not correct sorted in the output file. I look at the
code from the Intwritable.Comparator and i am confused.
Currently the compare-method returns:
return thisValue - thatValue;
But what is, if "thisValue" has the value Integer.MIN_VALUE+1 and the
"thatValue" has the value 2. The result of the method are return
2147483647. In that case the compare method says that "thisValue" is
greater than "thatValue".
The method should be return like that:
thisValue < thatValue ? -1 : thisValue == thatValue ? 0 : 1;
Or overlook i something?