public class KafkaSourceConsumerFn<T> extends DoFn<java.util.Map<java.lang.String,java.lang.String>,T>
Currently it has a time limiter (see OffsetTracker
) which, if set, it will stop
automatically after the specified elapsed minutes. Otherwise, it will keep running until the user
explicitly interrupts it.
It might be initialized either as:
KafkaSourceConsumerFn(connectorClass, SourceRecordMapper)Or with a time limiter:
KafkaSourceConsumerFn(connectorClass, SourceRecordMapper, minutesToRun)
Modifier and Type | Class and Description |
---|---|
static class |
KafkaSourceConsumerFn.DebeziumSDFDatabaseHistory |
DoFn.AlwaysFetched, DoFn.BoundedPerElement, DoFn.BundleFinalizer, DoFn.Element, DoFn.FieldAccess, DoFn.FinishBundle, DoFn.FinishBundleContext, DoFn.GetInitialRestriction, DoFn.GetInitialWatermarkEstimatorState, DoFn.GetRestrictionCoder, DoFn.GetSize, DoFn.GetWatermarkEstimatorStateCoder, DoFn.Key, DoFn.MultiOutputReceiver, DoFn.NewTracker, DoFn.NewWatermarkEstimator, DoFn.OnTimer, DoFn.OnTimerContext, DoFn.OnTimerFamily, DoFn.OnWindowExpiration, DoFn.OnWindowExpirationContext, DoFn.OutputReceiver<T>, DoFn.ProcessContext, DoFn.ProcessContinuation, DoFn.ProcessElement, DoFn.RequiresStableInput, DoFn.RequiresTimeSortedInput, DoFn.Restriction, DoFn.Setup, DoFn.SideInput, DoFn.SplitRestriction, DoFn.StartBundle, DoFn.StartBundleContext, DoFn.StateId, DoFn.Teardown, DoFn.TimerFamily, DoFn.TimerId, DoFn.Timestamp, DoFn.TruncateRestriction, DoFn.UnboundedPerElement, DoFn.WatermarkEstimatorState, DoFn.WindowedContext
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
BEAM_INSTANCE_PROPERTY |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getHashCode() |
org.apache.beam.io.debezium.KafkaSourceConsumerFn.OffsetHolder |
getInitialRestriction(java.util.Map<java.lang.String,java.lang.String> unused) |
Coder<org.apache.beam.io.debezium.KafkaSourceConsumerFn.OffsetHolder> |
getRestrictionCoder() |
RestrictionTracker<org.apache.beam.io.debezium.KafkaSourceConsumerFn.OffsetHolder,java.util.Map<java.lang.String,java.lang.Object>> |
newTracker(org.apache.beam.io.debezium.KafkaSourceConsumerFn.OffsetHolder restriction) |
DoFn.ProcessContinuation |
process(java.util.Map<java.lang.String,java.lang.String> element,
RestrictionTracker<org.apache.beam.io.debezium.KafkaSourceConsumerFn.OffsetHolder,java.util.Map<java.lang.String,java.lang.Object>> tracker,
DoFn.OutputReceiver<T> receiver)
Process the retrieved element.
|
getAllowedTimestampSkew, getInputTypeDescriptor, getOutputTypeDescriptor, populateDisplayData, prepareForProcessing
public static final java.lang.String BEAM_INSTANCE_PROPERTY
@DoFn.GetInitialRestriction public org.apache.beam.io.debezium.KafkaSourceConsumerFn.OffsetHolder getInitialRestriction(@DoFn.Element java.util.Map<java.lang.String,java.lang.String> unused) throws java.io.IOException
java.io.IOException
@DoFn.NewTracker public RestrictionTracker<org.apache.beam.io.debezium.KafkaSourceConsumerFn.OffsetHolder,java.util.Map<java.lang.String,java.lang.Object>> newTracker(@DoFn.Restriction org.apache.beam.io.debezium.KafkaSourceConsumerFn.OffsetHolder restriction)
@DoFn.GetRestrictionCoder public Coder<org.apache.beam.io.debezium.KafkaSourceConsumerFn.OffsetHolder> getRestrictionCoder()
@DoFn.ProcessElement public DoFn.ProcessContinuation process(@DoFn.Element java.util.Map<java.lang.String,java.lang.String> element, RestrictionTracker<org.apache.beam.io.debezium.KafkaSourceConsumerFn.OffsetHolder,java.util.Map<java.lang.String,java.lang.Object>> tracker, DoFn.OutputReceiver<T> receiver) throws java.lang.Exception
element
- Record retrievedtracker
- Restriction Trackerreceiver
- Output Receiverjava.lang.Exception
public java.lang.String getHashCode()