Class TieredStorageProducerClient
- java.lang.Object
-
- org.apache.flink.runtime.io.network.partition.hybrid.tiered.storage.TieredStorageProducerClient
-
public class TieredStorageProducerClient extends Object
Client of the Tiered Storage used by the producer.
-
-
Constructor Summary
Constructors Constructor Description TieredStorageProducerClient(int numSubpartitions, boolean isBroadcastOnly, BufferAccumulator bufferAccumulator, BufferCompressor bufferCompressor, List<TierProducerAgent> tierProducerAgents)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
void
setMetricStatisticsUpdater(Consumer<TieredStorageProducerMetricUpdate> metricStatisticsUpdater)
void
write(ByteBuffer record, TieredStorageSubpartitionId subpartitionId, Buffer.DataType dataType, boolean isBroadcast)
Write records to the producer client.
-
-
-
Constructor Detail
-
TieredStorageProducerClient
public TieredStorageProducerClient(int numSubpartitions, boolean isBroadcastOnly, BufferAccumulator bufferAccumulator, @Nullable BufferCompressor bufferCompressor, List<TierProducerAgent> tierProducerAgents)
-
-
Method Detail
-
write
public void write(ByteBuffer record, TieredStorageSubpartitionId subpartitionId, Buffer.DataType dataType, boolean isBroadcast) throws IOException
Write records to the producer client. TheBufferAccumulator
will accumulate the records into buffers.Note that isBroadcast indicates whether the record is broadcast, while isBroadcastOnly indicates whether the result partition is broadcast-only. When the result partition is not broadcast-only and the record is a broadcast record, the record will be written to all the subpartitions.
- Parameters:
record
- the written record datasubpartitionId
- the subpartition identifierdataType
- the data type of the recordisBroadcast
- whether the record is a broadcast record- Throws:
IOException
-
setMetricStatisticsUpdater
public void setMetricStatisticsUpdater(Consumer<TieredStorageProducerMetricUpdate> metricStatisticsUpdater)
-
close
public void close()
-
-