code: public ShuffleIndexRecord getIndex(int reduceId) {
      long offset = offsets.get(reduceId);
      long nextOffset = offsets.get(reduceId + 1);
      return new ShuffleIndexRecord(offset, nextOffset - offset);
    }
docs: Get index offset for a particular reducer.