Class TieredStorageProducerClient
java.lang.Object
org.apache.flink.runtime.io.network.partition.hybrid.tiered.storage.TieredStorageProducerClient
Client of the Tiered Storage used by the producer.
-
Constructor Summary
ConstructorsConstructorDescriptionTieredStorageProducerClient(int numSubpartitions, boolean isBroadcastOnly, BufferAccumulator bufferAccumulator, BufferCompressor bufferCompressor, List<TierProducerAgent> tierProducerAgents) -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()voidsetMetricStatisticsUpdater(Consumer<TieredStorageProducerMetricUpdate> metricStatisticsUpdater) voidwrite(ByteBuffer record, TieredStorageSubpartitionId subpartitionId, Buffer.DataType dataType, boolean isBroadcast) Write records to the producer client.
-
Constructor Details
-
TieredStorageProducerClient
public TieredStorageProducerClient(int numSubpartitions, boolean isBroadcastOnly, BufferAccumulator bufferAccumulator, @Nullable BufferCompressor bufferCompressor, List<TierProducerAgent> tierProducerAgents)
-
-
Method Details
-
write
public void write(ByteBuffer record, TieredStorageSubpartitionId subpartitionId, Buffer.DataType dataType, boolean isBroadcast) throws IOException Write records to the producer client. TheBufferAccumulatorwill 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()
-