code: public int compare (IntWritable i, IntWritable j) {
      // indicate we're making progress but do a batch update
      if (progressCalls < progressUpdateFrequency) {
        progressCalls++;
      } else {
        progressCalls = 0;
        reporter.progress();
      }  
      return comparator.compare(keyValBuffer.getData(), startOffsets[i.get()],
                                keyLengths[i.get()],
                                keyValBuffer.getData(), startOffsets[j.get()], 
                                keyLengths[j.get()]);
    }
docs: The implementation of the compare method from Comparator. Note that
  Comparator.compare takes objects as inputs and so the int values are
  wrapped in (reusable) IntWritables from the class util.MergeSort
  @param i
  @param j
  @return int as per the specification of Comparator.compare