Creates new OnePidRecordIterator returning records in the range.

@param offset the number of records skipped from the beginning of the list.
@param length the number of records to return.

@return OnePidRecordIterator instance.
491212
protected Iterator<RepositoryLogRecord> getNewIterator(int offset, int length) {
		OnePidRecordListImpl logResult = getLogResult();
		OnePidRecordListImpl traceResult = getTraceResult();
		if (logResult == null && traceResult == null) {
			return EMPTY_ITERATOR;
		} else if (traceResult == null) {
			return logResult.getNewIterator(offset, length);
		} else if (logResult == null) {
			return traceResult.getNewIterator(offset, length);
		} else {
			MergedServerInstanceLogRecordIterator result = new MergedServerInstanceLogRecordIterator(logResult, traceResult);
			result.setRange(offset, length);
			return result;
		}
	}
489924
public static final Bytes of(byte[] data, int offset, int length) {
    Objects.requireNonNull(data);
    if (length == 0) {
      return EMPTY;
    }
    byte[] copy = new byte[length];
    System.arraycopy(data, offset, copy, 0, length);
    return new Bytes(copy);
  }
1143698
public Slice slice(int index, int length)
    {
        if (index == 0 && length == this.length) {
            return this;
        }

        checkPositionIndexes(index, index + length, this.length);
        if (index >= 0 && length == 0) {
            return Slices.EMPTY_SLICE;
        }
        return new Slice(data, offset + index, length);
    }
1231956
public Slice slice(int index, int length)
    {
        if ((index == 0) && (length == length())) {
            return this;
        }
        checkIndexLength(index, length);
        if (length == 0) {
            return Slices.EMPTY_SLICE;
        }
        return new Slice(base, address + index, length, reference);
    }
754340
public static IntArray getInstance(byte[] buffer, int offset, int length)
    {
        return getInstance(buffer, offset, length, 8, ByteOrder.BIG_ENDIAN);
    }
645356
public static OffsetRequest readFrom(ByteBuffer buffer) {
        String topic = Utils.readShortString(buffer);
        int partition = buffer.getInt();
        long offset = buffer.getLong();
        int maxNumOffsets = buffer.getInt();
        return new OffsetRequest(topic, partition, offset, maxNumOffsets);
    }
84774
public static Pair<Integer, Integer> getUtf8Range(final byte[] buffer, final int offset,
      final int length) {
    final int start = getUtf8ByteStart(buffer, offset);
    final int end = getUtf8ByteEnd(buffer, offset + length - 1);

    return new Pair<>(start, end - start + 1);
  }
1053198
public static Slice wrappedIntArray(int[] array, int offset, int length)
    {
        if (length == 0) {
            return EMPTY_SLICE;
        }
        return new Slice(array, offset, length);
    }
750606
protected UUID getBackpointerAttributeKey(long offset) {
        Preconditions.checkArgument(offset >= 0, "offset must be a non-negative number.");
        return new UUID(TableBucket.BACKPOINTER_PREFIX, offset);
    }
166214
public static <T> LatchedObserver<T> createIndexed(Action2<? super T, ? super Integer> onNext, Action1<? super Throwable> onError) {
        return createIndexed(onNext, onError, new CountDownLatch(1));
    }
366732
protected WARCRecord createArchiveRecord(InputStream is, long offset)
    throws IOException {
        return (WARCRecord)currentRecord(new WARCRecord(is,
        	getReaderIdentifier(), offset, isDigest(), isStrict()));
    }
1330407
public synchronized void createHole(final long iRecordOffset, final int iRecordSize) throws IOException {
    final long timer = OProfiler.getInstance().startChrono();

    // IN MEMORY
    final int recycledPosition;
    final ODataHoleInfo hole;
    if (!freeHoles.isEmpty()) {
      // RECYCLE THE FIRST FREE HOLE
      recycledPosition = freeHoles.remove(0);
      hole = availableHolesList.get(recycledPosition);
      hole.dataOffset = iRecordOffset;
      hole.size = iRecordSize;
    } else {
      // APPEND A NEW ONE
      recycledPosition = getHoles();
      hole = new ODataHoleInfo(iRecordSize, iRecordOffset, recycledPosition);
      availableHolesList.add(hole);
      file.allocateSpace(RECORD_SIZE);
    }

    availableHolesBySize.put(hole, hole);
    availableHolesByPosition.put(hole, hole);

    if (maxHoleSize < iRecordSize)
      maxHoleSize = iRecordSize;

    // TO FILE
    final long p = recycledPosition * RECORD_SIZE;
    file.writeLong(p, iRecordOffset);
    file.writeInt(p + OBinaryProtocol.SIZE_LONG, iRecordSize);

    OProfiler.getInstance().stopChrono(PROFILER_DATA_HOLE_CREATE, timer);
  }
807042
@Override public RecordReader<LongWritable,SAMRecordWritable>
		createRecordReader(InputSplit split, TaskAttemptContext ctx)
			throws InterruptedException, IOException
	{
		final RecordReader<LongWritable,SAMRecordWritable> rr =
			new SAMRecordReader();
		rr.initialize(split, ctx);
		return rr;
	}
1223138
public static void fillCounting(int[] array , int offset, int length ) {
		for (int i = 0; i < length; i++) {
			array[i+offset] = i;
		}
	}
518052
public ShuffleIndexRecord getIndex(int reduceId) {
    long offset = offsets.get(reduceId);
    long nextOffset = offsets.get(reduceId + 1);
    return new ShuffleIndexRecord(offset, nextOffset - offset);
  }
95364
@SneakyThrows
    public static Duration newDuration(final String length) {
        if (NumberUtils.isCreatable(length)) {
            return Duration.ofSeconds(Long.parseLong(length));
        }
        return Duration.parse(length);
    }
633528
protected int checkRead(int offset, int length) {
    checkOffset(offset);
    int position = offset + length;
    if (position > size()) {
      throw new BufferUnderflowException();
    }
    return position;
  }