public interface BufferAccumulator extends AutoCloseable
BufferAccumulator receives the records
from tiered store producer and the records will accumulate and transform into buffers.| Modifier and Type | Method and Description |
|---|---|
void |
close()
Close the accumulator.
|
void |
receive(ByteBuffer record,
TieredStorageSubpartitionId subpartitionId,
Buffer.DataType dataType,
boolean isBroadcast)
Receives the records from tiered store producer, these records will be accumulated and
transformed into finished buffers.
|
void |
setup(org.apache.flink.util.function.TriConsumer<TieredStorageSubpartitionId,Buffer,Integer> bufferFlusher)
Setup the accumulator.
|
void setup(org.apache.flink.util.function.TriConsumer<TieredStorageSubpartitionId,Buffer,Integer> bufferFlusher)
bufferFlusher - accepts the accumulated buffers. The first field is the subpartition id,
the second is the accumulated buffer to flush, and the third is the number of remaining
buffers to be written consecutively to the same segment.void receive(ByteBuffer record, TieredStorageSubpartitionId subpartitionId, Buffer.DataType dataType, boolean isBroadcast) throws IOException
Note that when isBroadcast is true, for a broadcast-only partition, the subpartitionId value will always be 0. Conversely, for a non-broadcast-only partition, the subpartitionId value will range from 0 to the number of subpartitions.
record - the received recordsubpartitionId - the subpartition id of the recorddataType - the data type of the recordisBroadcast - whether the record is a broadcast recordIOExceptionvoid close()
close in interface AutoCloseableCopyright © 2014–2025 The Apache Software Foundation. All rights reserved.