| Package | Description |
|---|---|
| org.apache.hadoop.fs |
An abstract file system API.
|
| org.apache.hadoop.fs.impl |
This package contains implementation classes for use inside
filesystems.
|
| Modifier and Type | Method | Description |
|---|---|---|
static <T extends FileRange> |
VectoredReadUtils.validateRangeRequest(T range) |
Validate a single range.
|
| Modifier and Type | Method | Description |
|---|---|---|
static FileRange |
FileRange.createFileRange(long offset,
int length) |
Factory method to create a FileRange object.
|
static FileRange |
FileRange.createFileRange(long offset,
int length,
java.lang.Object reference) |
Factory method to create a FileRange object.
|
static FileRange[] |
VectoredReadUtils.sortRanges(java.util.List<? extends FileRange> input) |
Sort the input ranges by offset; no validation is done.
|
| Modifier and Type | Method | Description |
|---|---|---|
static java.util.List<? extends FileRange> |
VectoredReadUtils.sortRangeList(java.util.List<? extends FileRange> input) |
Sort the input ranges by offset; no validation is done.
|
static java.util.List<? extends FileRange> |
VectoredReadUtils.validateAndSortRanges(java.util.List<? extends FileRange> input,
java.util.Optional<java.lang.Long> fileLength) |
Validate a list of ranges (including overlapping checks) and
return the sorted list.
|
| Modifier and Type | Method | Description |
|---|---|---|
static void |
VectoredReadUtils.readInDirectBuffer(FileRange range,
java.nio.ByteBuffer buffer,
Function4RaisingIOE<java.lang.Long,byte[],java.lang.Integer,java.lang.Integer,java.lang.Void> operation) |
Read bytes from stream into a byte buffer using an
intermediate byte array.
|
static java.util.concurrent.CompletableFuture<java.nio.ByteBuffer> |
VectoredReadUtils.readRangeFrom(PositionedReadable stream,
FileRange range,
java.util.function.IntFunction<java.nio.ByteBuffer> allocate) |
Synchronously reads a range from the stream dealing with the combinations
of ByteBuffers buffers and PositionedReadable streams.
|
static java.nio.ByteBuffer |
VectoredReadUtils.sliceTo(java.nio.ByteBuffer readData,
long readOffset,
FileRange request) |
Slice the data that was read to the user's request.
|
| Modifier and Type | Method | Description |
|---|---|---|
static boolean |
VectoredReadUtils.isOrderedDisjoint(java.util.List<? extends FileRange> input,
int chunkSize,
int minimumSeek) |
Is the given input list.
|
static java.util.List<CombinedFileRange> |
VectoredReadUtils.mergeSortedRanges(java.util.List<? extends FileRange> sortedRanges,
int chunkSize,
int minimumSeek,
int maxSize) |
Merge sorted ranges to optimize the access from the underlying file
system.
|
void |
BufferedFSInputStream.readVectored(java.util.List<? extends FileRange> ranges,
java.util.function.IntFunction<java.nio.ByteBuffer> allocate) |
|
void |
FSDataInputStream.readVectored(java.util.List<? extends FileRange> ranges,
java.util.function.IntFunction<java.nio.ByteBuffer> allocate) |
|
default void |
PositionedReadable.readVectored(java.util.List<? extends FileRange> ranges,
java.util.function.IntFunction<java.nio.ByteBuffer> allocate) |
Read fully a list of file ranges asynchronously from this file.
|
static void |
VectoredReadUtils.readVectored(PositionedReadable stream,
java.util.List<? extends FileRange> ranges,
java.util.function.IntFunction<java.nio.ByteBuffer> allocate) |
This is the default implementation which iterates through the ranges
to read each synchronously, but the intent is that subclasses
can make more efficient readers.
|
static java.util.List<? extends FileRange> |
VectoredReadUtils.sortRangeList(java.util.List<? extends FileRange> input) |
Sort the input ranges by offset; no validation is done.
|
static FileRange[] |
VectoredReadUtils.sortRanges(java.util.List<? extends FileRange> input) |
Sort the input ranges by offset; no validation is done.
|
static java.util.List<? extends FileRange> |
VectoredReadUtils.validateAndSortRanges(java.util.List<? extends FileRange> input,
java.util.Optional<java.lang.Long> fileLength) |
Validate a list of ranges (including overlapping checks) and
return the sorted list.
|
static void |
VectoredReadUtils.validateVectoredReadRanges(java.util.List<? extends FileRange> ranges) |
Validate a list of vectored read ranges.
|
| Modifier and Type | Class | Description |
|---|---|---|
class |
CombinedFileRange |
A file range that represents a set of underlying file ranges.
|
class |
FileRangeImpl |
A range of bytes from a file with an optional buffer to read those bytes
for zero copy.
|
| Modifier and Type | Method | Description |
|---|---|---|
java.util.List<FileRange> |
CombinedFileRange.getUnderlying() |
Get the list of ranges that were merged together to form this one.
|
| Modifier and Type | Method | Description |
|---|---|---|
boolean |
CombinedFileRange.merge(long otherOffset,
long otherEnd,
FileRange other,
int minSeek,
int maxSize) |
Merge this input range into the current one, if it is compatible.
|
| Constructor | Description |
|---|---|
CombinedFileRange(long offset,
long end,
FileRange original) |
Copyright © 2008–2025 Apache Software Foundation. All rights reserved.