in hadoop-api-shim/src/main/java/org/apache/hadoop/fs/shim/impl/FSDataInputStreamShimImpl.java [421:440]
public void readVectoredRanges(
List<VectorFileRange> ranges,
IntFunction<ByteBuffer> allocate)
throws IOException {
// if the readRange API is present, convert the arguments and delegate.
if (readVectored.available()) {
final List<Object> list = ranges.stream()
.map(FILE_RANGE_BRIDGE::toFileRange)
.collect(Collectors.toList());
invokeReadVectored(list, allocate);
} else {
// one of ranges.
// fallback code
VectoredRangeReadImpl.readRanges(this,
isByteBufferPositionedReadAvailable(),
ranges,
allocate);
}
}