mirror of
https://github.com/alibaba/canal.git
synced 2026-11-04 00:30:15 +08:00
fixed merge code
This commit is contained in:
@@ -98,6 +98,14 @@ public class CanalController {
|
||||
port = Integer.valueOf(getProperty(properties, CanalConstants.CANAL_PORT));
|
||||
embededCanalServer = CanalServerWithEmbedded.instance();
|
||||
embededCanalServer.setCanalInstanceGenerator(instanceGenerator);// 设置自定义的instanceGenerator
|
||||
try {
|
||||
int metricsPort = Integer.valueOf(getProperty(properties, CanalConstants.CANAL_METRICS_PULL_PORT));
|
||||
embededCanalServer.setMetricsPort(metricsPort);
|
||||
} catch (NumberFormatException e) {
|
||||
logger.info("No valid metrics server port found, use default 11112.");
|
||||
embededCanalServer.setMetricsPort(11112);
|
||||
}
|
||||
|
||||
String canalWithoutNetty = getProperty(properties, CanalConstants.CANAL_WITHOUT_NETTY);
|
||||
if (canalWithoutNetty == null || "false".equals(canalWithoutNetty)) {
|
||||
canalServer = CanalServerWithNetty.instance();
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
canal.id= 1
|
||||
canal.ip=
|
||||
canal.port=11111
|
||||
canal.metrics.pull.port=11112
|
||||
canal.zkServers=
|
||||
# flush data to zk
|
||||
canal.zookeeper.flush.period = 1000
|
||||
|
||||
Reference in New Issue
Block a user