code: @Override
    public boolean nextKeyValue() throws IOException, InterruptedException {
      if (!hasMore) {
        key = null;
        value = null;
        return false;
      }
      firstValue = !nextKeyIsSame;
      DataInputBuffer next = input.getKey();
      currentRawKey.set(next.getData(), next.getPosition(), 
                        next.getLength() - next.getPosition());
      buffer.reset(currentRawKey.getBytes(), 0, currentRawKey.getLength());
      key = keyDeserializer.deserialize(key);
      next = input.getValue();
      buffer.reset(next.getData(), next.getPosition(), next.getLength());
      value = valueDeserializer.deserialize(value);
      hasMore = input.next();
      if (hasMore) {
        next = input.getKey();
        nextKeyIsSame = comparator.compare(currentRawKey.getBytes(), 0, 
                                           currentRawKey.getLength(),
                                           next.getData(),
                                           next.getPosition(),
                                           next.getLength() - next.getPosition()
                                           ) == 0;
      } else {
        nextKeyIsSame = false;
      }
      inputValueCounter.increment(1);
      return true;
    }
docs: Advance to the next key/value pair.