pulsar-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] sijie commented on a change in pull request #2998: support mysql binlog sync to pulsar by canal
Date Fri, 16 Nov 2018 21:54:05 GMT
sijie commented on a change in pull request #2998: support mysql binlog sync to pulsar by canal
URL: https://github.com/apache/pulsar/pull/2998#discussion_r234356924
 
 

 ##########
 File path: pulsar-io/canal/src/main/java/org/apache/pulsar/io/canal/CanalSource.java
 ##########
 @@ -0,0 +1,152 @@
+package org.apache.pulsar.io.canal;
+
+import com.alibaba.fastjson.JSON;
+import com.alibaba.fastjson.serializer.SerializerFeature;
+import com.alibaba.otter.canal.client.CanalConnector;
+import com.alibaba.otter.canal.client.CanalConnectors;
+import com.alibaba.otter.canal.protocol.Message;
+import com.alibaba.otter.canal.protocol.FlatMessage;
+import lombok.extern.slf4j.Slf4j;
+import org.apache.pulsar.functions.api.Record;
+import org.apache.pulsar.io.core.PushSource;
+import org.apache.pulsar.io.core.SourceContext;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.slf4j.MDC;
+import org.springframework.util.Assert;
+
+import java.net.InetSocketAddress;
+import java.util.List;
+import java.util.Map;
+import java.util.Optional;
+
+@Slf4j
+public class CanalSource extends PushSource<byte[]> {
+
+    protected Thread thread = null;
+
+    protected volatile boolean running = false;
+
+    private CanalConnector connector;
+
+    private CanalSourceConfig canalSourceConfig;
+
+    protected Thread.UncaughtExceptionHandler handler = new Thread.UncaughtExceptionHandler()
{
 
 Review comment:
   `protected final`

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message