public class PulsarRecordEmitter<T> extends Object implements RecordEmitter<org.apache.pulsar.client.api.Message<byte[]>,T,PulsarPartitionSplitState>
RecordEmitter
implementation for both PulsarOrderedSourceReader
and PulsarUnorderedSourceReader
. We would always update the last consumed message id in this
emitter.Constructor and Description |
---|
PulsarRecordEmitter(PulsarDeserializationSchema<T> deserializationSchema) |
Modifier and Type | Method and Description |
---|---|
void |
emitRecord(org.apache.pulsar.client.api.Message<byte[]> element,
SourceOutput<T> output,
PulsarPartitionSplitState splitState)
Process and emit the records to the
SourceOutput . |
public PulsarRecordEmitter(PulsarDeserializationSchema<T> deserializationSchema)
public void emitRecord(org.apache.pulsar.client.api.Message<byte[]> element, SourceOutput<T> output, PulsarPartitionSplitState splitState) throws Exception
RecordEmitter
SourceOutput
. A few recommendations to the
implementation are following:
emitRecord
in interface RecordEmitter<org.apache.pulsar.client.api.Message<byte[]>,T,PulsarPartitionSplitState>
element
- 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–2022 The Apache Software Foundation. All rights reserved.