public interface HsFileDataIndex
Note: Buffers added to this index should not be read until being explicitly marked READABLE.
| 限定符和类型 | 接口和说明 |
|---|---|
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.
|
| 限定符和类型 | 方法和说明 |
|---|---|
void |
addBuffers(List<HsFileDataIndex.SpilledBuffer> spilledBuffers)
Add buffers to the index.
|
void |
close()
Close this file data 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 subpartitionvoid close()
Copyright © 2014–2023 The Apache Software Foundation. All rights reserved.