Package org.apache.pulsar.io.canal
Class CanalAbstractSource<V>
java.lang.Object
org.apache.pulsar.io.core.AbstractPushSource<T>
org.apache.pulsar.io.core.PushSource<V>
org.apache.pulsar.io.canal.CanalAbstractSource<V>
- All Implemented Interfaces:
AutoCloseable,Source<V>
- Direct Known Subclasses:
CanalByteSource,CanalStringSource
A Simple abstract class for mysql binlog sync to pulsar.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final Thread.UncaughtExceptionHandlerprotected booleanprotected Thread -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()abstract VextractValue(List<com.alibaba.otter.canal.protocol.FlatMessage> flatMessages) abstract LonggetMessageId(com.alibaba.otter.canal.protocol.Message message) voidopen(Map<String, Object> config, SourceContext sourceContext) protected voidprocess()protected voidstart()Methods inherited from class org.apache.pulsar.io.core.PushSource
readMethods inherited from class org.apache.pulsar.io.core.AbstractPushSource
consume, getQueueLength, notifyError, readNext
-
Field Details
-
thread
-
running
protected volatile boolean running -
handler
-
-
Constructor Details
-
CanalAbstractSource
public CanalAbstractSource()
-
-
Method Details
-
open
- Throws:
Exception
-
start
protected void start() -
close
- Throws:
InterruptedException
-
process
protected void process() -
getMessageId
-
extractValue
-