public interface HsFileDataIndex
Note: Buffers added to this index should not be read until being explicitly marked READABLE.
Modifier and Type | Interface and Description |
---|---|
static class |
HsFileDataIndex.ReadableRegion
Represents a series of physically continuous buffers in the file, which are readable, from
the same subpartition, and has sequential buffer index.
|
static class |
HsFileDataIndex.SpilledBuffer
Represents a spilled buffer.
|
Modifier and Type | Method and Description |
---|---|
void |
addBuffers(List<HsFileDataIndex.SpilledBuffer> spilledBuffers)
Add buffers to the index.
|
Optional<HsFileDataIndex.ReadableRegion> |
getReadableRegion(int subpartitionId,
int bufferIndex,
int consumingOffset)
Get a
HsFileDataIndex.ReadableRegion for the given subpartition that starts with the given buffer
index, if existed. |
void |
markBufferReleased(int subpartitionId,
int bufferIndex)
Mark a buffer as RELEASED.
|
Optional<HsFileDataIndex.ReadableRegion> getReadableRegion(int subpartitionId, int bufferIndex, int consumingOffset)
HsFileDataIndex.ReadableRegion
for the given subpartition that starts with the given buffer
index, if existed.
Note: Depending on the implementation, this method does not guarantee to always return the longest possible readable region.
subpartitionId
- that the readable region belongs tobufferIndex
- that the readable region starts withconsumingOffset
- of the downstreamHsFileDataIndex.ReadableRegion
for the given subpartition that starts with the given buffer
index, if exist; otherwise, Optional.empty()
.void addBuffers(List<HsFileDataIndex.SpilledBuffer> spilledBuffers)
Attention: this method only called by spilling thread.
spilledBuffers
- to be added. The buffers in the list are expected in the same order as
in the spilled file.void markBufferReleased(int subpartitionId, int bufferIndex)
subpartitionId
- that the buffer belongs tobufferIndex
- of the buffer within the subpartitionCopyright © 2014–2024 The Apache Software Foundation. All rights reserved.