| 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 and Description |
|---|---|
static FileRange |
FileRange.createFileRange(long offset,
int length)
Factory method to create a FileRange object.
|
static FileRange |
FileRange.createFileRange(long offset,
int length,
Object reference)
Factory method to create a FileRange object.
|
static FileRange[] |
VectoredReadUtils.sortRanges(List<? extends FileRange> input)
Sort the input ranges by offset.
|
| Modifier and Type | Method and Description |
|---|---|
static List<? extends FileRange> |
VectoredReadUtils.validateNonOverlappingAndReturnSortedRanges(List<? extends FileRange> input)
Check if the input ranges are overlapping in nature.
|
| Modifier and Type | Method and Description |
|---|---|
static CompletableFuture<ByteBuffer> |
VectoredReadUtils.readRangeFrom(PositionedReadable stream,
FileRange range,
IntFunction<ByteBuffer> allocate)
Synchronously reads a range from the stream dealing with the combinations
of ByteBuffers buffers and PositionedReadable streams.
|
static ByteBuffer |
VectoredReadUtils.sliceTo(ByteBuffer readData,
long readOffset,
FileRange request)
Slice the data that was read to the user's request.
|
static void |
VectoredReadUtils.validateRangeRequest(FileRange range)
Validate a single range.
|
| Modifier and Type | Method and Description |
|---|---|
static boolean |
VectoredReadUtils.isOrderedDisjoint(List<? extends FileRange> input,
int chunkSize,
int minimumSeek)
Is the given input list.
|
static List<CombinedFileRange> |
VectoredReadUtils.mergeSortedRanges(List<? extends FileRange> sortedRanges,
int chunkSize,
int minimumSeek,
int maxSize)
Merge sorted ranges to optimize the access from the underlying file
system.
|
default void |
PositionedReadable.readVectored(List<? extends FileRange> ranges,
IntFunction<ByteBuffer> allocate)
Read fully a list of file ranges asynchronously from this file.
|
void |
FSDataInputStream.readVectored(List<? extends FileRange> ranges,
IntFunction<ByteBuffer> allocate) |
static void |
VectoredReadUtils.readVectored(PositionedReadable stream,
List<? extends FileRange> ranges,
IntFunction<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 FileRange[] |
VectoredReadUtils.sortRanges(List<? extends FileRange> input)
Sort the input ranges by offset.
|
static List<? extends FileRange> |
VectoredReadUtils.validateNonOverlappingAndReturnSortedRanges(List<? extends FileRange> input)
Check if the input ranges are overlapping in nature.
|
static void |
VectoredReadUtils.validateVectoredReadRanges(List<? extends FileRange> ranges)
Validate a list of vectored read ranges.
|
| Modifier and Type | Class and Description |
|---|---|
class |
CombinedFileRange
A file range that represents a set of underlying file ranges.
|
class |
org.apache.hadoop.fs.impl.FileRangeImpl
A range of bytes from a file with an optional buffer to read those bytes
for zero copy.
|
| Modifier and Type | Method and Description |
|---|---|
List<FileRange> |
CombinedFileRange.getUnderlying()
Get the list of ranges that were merged together to form this one.
|
| Modifier and Type | Method and 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 and Description |
|---|
CombinedFileRange(long offset,
long end,
FileRange original) |
Copyright © 2008–2023 Apache Software Foundation. All rights reserved.