public class HsBufferContext extends Object
Each buffer has three status: released, spillStarted, consumed.
released indicates that buffer has been released from the memory data manager, and
can no longer be spilled or consumed.
spillStarted indicates that spilling of the buffer has started, either completed
or not.
consumed indicates that buffer has been consumed by the downstream.
Reference count of the buffer is maintained as follows: *
Note: This class is not thread-safe.
| 构造器和说明 |
|---|
HsBufferContext(Buffer buffer,
int bufferIndex,
int subpartitionId) |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
consumed() |
Buffer |
getBuffer() |
BufferIndexAndChannel |
getBufferIndexAndChannel() |
Optional<CompletableFuture<Void>> |
getSpilledFuture() |
boolean |
isConsumed() |
boolean |
isReleased() |
boolean |
isSpillStarted() |
void |
release()
Mark buffer status to release.
|
boolean |
startSpilling(CompletableFuture<Void> spilledFuture)
Mark buffer status to startSpilling.
|
public HsBufferContext(Buffer buffer, int bufferIndex, int subpartitionId)
public Buffer getBuffer()
public BufferIndexAndChannel getBufferIndexAndChannel()
public boolean isReleased()
public boolean isSpillStarted()
public boolean isConsumed()
public Optional<CompletableFuture<Void>> getSpilledFuture()
public void release()
public boolean startSpilling(CompletableFuture<Void> spilledFuture)
spilledFuture - completable future of this buffer's spilling operation.public void consumed()
Copyright © 2014–2023 The Apache Software Foundation. All rights reserved.