@Internal public class KafkaRecordEmitter<T> extends Object implements RecordEmitter<org.apache.kafka.clients.consumer.ConsumerRecord<byte[],byte[]>,T,KafkaPartitionSplitState>
RecordEmitter
implementation for KafkaSourceReader
.Constructor and Description |
---|
KafkaRecordEmitter(KafkaRecordDeserializationSchema<T> deserializationSchema) |
Modifier and Type | Method and Description |
---|---|
void |
emitRecord(org.apache.kafka.clients.consumer.ConsumerRecord<byte[],byte[]> consumerRecord,
SourceOutput<T> output,
KafkaPartitionSplitState splitState)
Process and emit the records to the
SourceOutput . |
public KafkaRecordEmitter(KafkaRecordDeserializationSchema<T> deserializationSchema)
public void emitRecord(org.apache.kafka.clients.consumer.ConsumerRecord<byte[],byte[]> consumerRecord, SourceOutput<T> output, KafkaPartitionSplitState splitState) throws Exception
RecordEmitter
SourceOutput
. A few recommendations to the
implementation are following:
emitRecord
in interface RecordEmitter<org.apache.kafka.clients.consumer.ConsumerRecord<byte[],byte[]>,T,KafkaPartitionSplitState>
consumerRecord
- The intermediate element read by the SplitReader.output
- The output to which the final records are emit to.splitState
- The state of the split.Exception
Copyright © 2014–2023 The Apache Software Foundation. All rights reserved.