Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
piplus-backend-v5-server-dockers
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
piplus-backend-v5
piplus-backend-v5-server-dockers
Commits
1bb1c345
Commit
1bb1c345
authored
Nov 06, 2016
by
yiming
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
64e8d56c
Changes
8
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
11 additions
and
959 deletions
+11
-959
Dockerfile
piplus-backend-v5-canal-docker/Dockerfile
+11
-8
canal.properties
piplus-backend-v5-canal-docker/conf/canal.properties
+0
-67
instance.properties
...-backend-v5-canal-docker/conf/example/instance.properties
+0
-27
logback.xml
piplus-backend-v5-canal-docker/conf/logback.xml
+0
-83
default-instance.xml
...-backend-v5-canal-docker/conf/spring/default-instance.xml
+0
-186
file-instance.xml
piplus-backend-v5-canal-docker/conf/spring/file-instance.xml
+0
-171
group-instance.xml
...us-backend-v5-canal-docker/conf/spring/group-instance.xml
+0
-258
memory-instance.xml
...s-backend-v5-canal-docker/conf/spring/memory-instance.xml
+0
-159
No files found.
piplus-backend-v5-canal-docker/Dockerfile
View file @
1bb1c345
# piplus v5 Canal Dockerfile
FROM
centos:7
MAINTAINER
focus <focus@hudongpai.com>
ENV
OSS pisns-oss-dev.oss-cn-hangzhou.aliyuncs.com
ENV
ROOT_DIR terran-devops
ENV
RUN_ENV dev
# Install myCat.
RUN
\
yum
install
-y
java-1.8.0-openjdk.x86_64
&&
\
yum
install
-y
wget
&&
\
cd
/opt
&&
\
wget http
s://git.wxpai.cn/piplus-backend-v5/piplus-backend-v5-download/raw/master/canal.deployer
-1.0.22.tar.gz
&&
\
wget http
://
$OSS
/
$ROOT_DIR
/lib/canal
-1.0.22.tar.gz
&&
\
mkdir
/opt/canal
&&
\
tar
zxvf canal.deployer-1.0.22.tar.gz
-C
/opt/canal
&&
\
rm
-rf
/opt/canal/conf
&&
\
tar
zxvf canal-1.0.22.tar.gz
-C
/opt/canal
&&
\
ls
-l
/opt
# Add src
ADD
conf /opt/canal/conf
ADD
conf
-$RUN_ENV
/opt/canal/conf
# Define mountable directories.
VOLUME
["/opt/canal/conf"]
VOLUME
["/opt/canal/conf
:/opt/canal/conf
"]
# Expose ports.
EXPOSE
8066
EXPOSE
11111
# Define working directory.
WORKDIR
/opt/canal/bin
# Define default command.
CMD
["startup.sh"]
\ No newline at end of file
CMD
["./startup.sh"]
piplus-backend-v5-canal-docker/conf/canal.properties
deleted
100755 → 0
View file @
64e8d56c
#################################################
######### common argument #############
#################################################
canal.id
=
1
canal.ip
=
canal.port
=
11111
canal.zkServers
=
# flush data to zk
canal.zookeeper.flush.period
=
1000
# flush meta cursor/parse position to file
canal.file.data.dir
=
${canal.conf.dir}
canal.file.flush.period
=
1000
## memory store RingBuffer size, should be Math.pow(2,n)
canal.instance.memory.buffer.size
=
16384
## memory store RingBuffer used memory unit size , default 1kb
canal.instance.memory.buffer.memunit
=
1024
## meory store gets mode used MEMSIZE or ITEMSIZE
canal.instance.memory.batch.mode
=
MEMSIZE
## detecing config
canal.instance.detecting.enable
=
false
#canal.instance.detecting.sql = insert into retl.xdual values(1,now()) on duplicate key update x=now()
canal.instance.detecting.sql
=
select 1
canal.instance.detecting.interval.time
=
3
canal.instance.detecting.retry.threshold
=
3
canal.instance.detecting.heartbeatHaEnable
=
false
# support maximum transaction size, more than the size of the transaction will be cut into multiple transactions delivery
canal.instance.transaction.size
=
1024
# mysql fallback connected to new master should fallback times
canal.instance.fallbackIntervalInSeconds
=
60
# network config
canal.instance.network.receiveBufferSize
=
16384
canal.instance.network.sendBufferSize
=
16384
canal.instance.network.soTimeout
=
30
# binlog filter config
canal.instance.filter.query.dcl
=
false
canal.instance.filter.query.dml
=
false
canal.instance.filter.query.ddl
=
false
canal.instance.filter.table.error
=
false
canal.instance.filter.rows
=
false
# binlog format/image check
canal.instance.binlog.format
=
ROW,STATEMENT,MIXED
canal.instance.binlog.image
=
FULL,MINIMAL,NOBLOB
# binlog ddl isolation
canal.instance.get.ddl.isolation
=
false
#################################################
######### destinations #############
#################################################
canal.destinations
=
example
# conf root dir
canal.conf.dir
=
../conf
# auto scan instance dir add/remove and start/stop instance
canal.auto.scan
=
true
canal.auto.scan.interval
=
5
canal.instance.global.mode
=
spring
canal.instance.global.lazy
=
false
#canal.instance.global.manager.address = 127.0.0.1:1099
#canal.instance.global.spring.xml = classpath:spring/memory-instance.xml
canal.instance.global.spring.xml
=
classpath:spring/file-instance.xml
#canal.instance.global.spring.xml = classpath:spring/default-instance.xml
piplus-backend-v5-canal-docker/conf/example/instance.properties
deleted
100755 → 0
View file @
64e8d56c
#################################################
## mysql serverId
canal.instance.mysql.slaveId
=
1234
# position info
canal.instance.master.address
=
127.0.0.1:3306
canal.instance.master.journal.name
=
canal.instance.master.position =
canal.instance.master.timestamp
=
#canal.instance.standby.address =
#canal.instance.standby.journal.name =
#canal.instance.standby.position =
#canal.instance.standby.timestamp =
# username/password
canal.instance.dbUsername
=
canal
canal.instance.dbPassword
=
canal
canal.instance.defaultDatabaseName
=
canal.instance.connectionCharset
=
UTF-8
# table regex
canal.instance.filter.regex
=
.*
\\
..*
# table black regex
canal.instance.filter.black.regex
=
#################################################
\ No newline at end of file
piplus-backend-v5-canal-docker/conf/logback.xml
deleted
100755 → 0
View file @
64e8d56c
<configuration
scan=
"true"
scanPeriod=
" 5 seconds"
>
<jmxConfigurator
/>
<appender
name=
"STDOUT"
class=
"ch.qos.logback.core.ConsoleAppender"
>
<encoder>
<pattern>
%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{56} - %msg%n
</pattern>
</encoder>
</appender>
<appender
name=
"CANAL-ROOT"
class=
"ch.qos.logback.classic.sift.SiftingAppender"
>
<discriminator>
<Key>
destination
</Key>
<DefaultValue>
canal
</DefaultValue>
</discriminator>
<sift>
<appender
name=
"FILE-${destination}"
class=
"ch.qos.logback.core.rolling.RollingFileAppender"
>
<File>
../logs/${destination}/${destination}.log
</File>
<rollingPolicy
class=
"ch.qos.logback.core.rolling.TimeBasedRollingPolicy"
>
<!-- rollover daily -->
<fileNamePattern>
../logs/${destination}/%d{yyyy-MM-dd}/${destination}-%d{yyyy-MM-dd}-%i.log.gz
</fileNamePattern>
<timeBasedFileNamingAndTriggeringPolicy
class=
"ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP"
>
<!-- or whenever the file size reaches 100MB -->
<maxFileSize>
512MB
</maxFileSize>
</timeBasedFileNamingAndTriggeringPolicy>
<maxHistory>
60
</maxHistory>
</rollingPolicy>
<encoder>
<pattern>
%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{56} - %msg%n
</pattern>
</encoder>
</appender>
</sift>
</appender>
<appender
name=
"CANAL-META"
class=
"ch.qos.logback.classic.sift.SiftingAppender"
>
<discriminator>
<Key>
destination
</Key>
<DefaultValue>
canal
</DefaultValue>
</discriminator>
<sift>
<appender
name=
"META-FILE-${destination}"
class=
"ch.qos.logback.core.rolling.RollingFileAppender"
>
<File>
../logs/${destination}/meta.log
</File>
<rollingPolicy
class=
"ch.qos.logback.core.rolling.TimeBasedRollingPolicy"
>
<!-- rollover daily -->
<fileNamePattern>
../logs/${destination}/%d{yyyy-MM-dd}/meta-%d{yyyy-MM-dd}-%i.log.gz
</fileNamePattern>
<timeBasedFileNamingAndTriggeringPolicy
class=
"ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP"
>
<!-- or whenever the file size reaches 100MB -->
<maxFileSize>
32MB
</maxFileSize>
</timeBasedFileNamingAndTriggeringPolicy>
<maxHistory>
60
</maxHistory>
</rollingPolicy>
<encoder>
<pattern>
%d{yyyy-MM-dd HH:mm:ss.SSS} - %msg%n
</pattern>
</encoder>
</appender>
</sift>
</appender>
<logger
name=
"com.alibaba.otter.canal.instance"
additivity=
"false"
>
<level
value=
"INFO"
/>
<appender-ref
ref=
"CANAL-ROOT"
/>
</logger>
<logger
name=
"com.alibaba.otter.canal.deployer"
additivity=
"false"
>
<level
value=
"INFO"
/>
<appender-ref
ref=
"CANAL-ROOT"
/>
</logger>
<logger
name=
"com.alibaba.otter.canal.meta.FileMixedMetaManager"
additivity=
"false"
>
<level
value=
"INFO"
/>
<appender-ref
ref=
"CANAL-META"
/>
</logger>
<root
level=
"WARN"
>
<!--
<appender-ref ref="STDOUT"/>
-->
<appender-ref
ref=
"CANAL-ROOT"
/>
</root>
</configuration>
\ No newline at end of file
piplus-backend-v5-canal-docker/conf/spring/default-instance.xml
deleted
100755 → 0
View file @
64e8d56c
<?xml version="1.0" encoding="UTF-8"?>
<beans
xmlns=
"http://www.springframework.org/schema/beans"
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xmlns:tx=
"http://www.springframework.org/schema/tx"
xmlns:aop=
"http://www.springframework.org/schema/aop"
xmlns:lang=
"http://www.springframework.org/schema/lang"
xmlns:context=
"http://www.springframework.org/schema/context"
xsi:schemaLocation=
"http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.0.xsd
http://www.springframework.org/schema/lang http://www.springframework.org/schema/lang/spring-lang-2.0.xsd
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.0.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-2.5.xsd"
default-autowire=
"byName"
>
<!-- properties -->
<bean
class=
"com.alibaba.otter.canal.instance.spring.support.PropertyPlaceholderConfigurer"
lazy-init=
"false"
>
<property
name=
"ignoreResourceNotFound"
value=
"true"
/>
<property
name=
"systemPropertiesModeName"
value=
"SYSTEM_PROPERTIES_MODE_OVERRIDE"
/>
<!-- 允许system覆盖 -->
<property
name=
"locationNames"
>
<list>
<value>
classpath:canal.properties
</value>
<value>
classpath:${canal.instance.destination:}/instance.properties
</value>
</list>
</property>
</bean>
<bean
id=
"socketAddressEditor"
class=
"com.alibaba.otter.canal.instance.spring.support.SocketAddressEditor"
/>
<bean
class=
"org.springframework.beans.factory.config.CustomEditorConfigurer"
>
<property
name=
"propertyEditorRegistrars"
>
<list>
<ref
bean=
"socketAddressEditor"
/>
</list>
</property>
</bean>
<bean
id=
"instance"
class=
"com.alibaba.otter.canal.instance.spring.CanalInstanceWithSpring"
>
<property
name=
"destination"
value=
"${canal.instance.destination}"
/>
<property
name=
"eventParser"
>
<ref
local=
"eventParser"
/>
</property>
<property
name=
"eventSink"
>
<ref
local=
"eventSink"
/>
</property>
<property
name=
"eventStore"
>
<ref
local=
"eventStore"
/>
</property>
<property
name=
"metaManager"
>
<ref
local=
"metaManager"
/>
</property>
<property
name=
"alarmHandler"
>
<ref
local=
"alarmHandler"
/>
</property>
</bean>
<!-- 报警处理类 -->
<bean
id=
"alarmHandler"
class=
"com.alibaba.otter.canal.common.alarm.LogAlarmHandler"
/>
<bean
id=
"zkClientx"
class=
"org.springframework.beans.factory.config.MethodInvokingFactoryBean"
>
<property
name=
"targetClass"
value=
"com.alibaba.otter.canal.common.zookeeper.ZkClientx"
/>
<property
name=
"targetMethod"
value=
"getZkClient"
/>
<property
name=
"arguments"
>
<list>
<value>
${canal.zkServers:127.0.0.1:2181}
</value>
</list>
</property>
</bean>
<bean
id=
"metaManager"
class=
"com.alibaba.otter.canal.meta.PeriodMixedMetaManager"
>
<property
name=
"zooKeeperMetaManager"
>
<bean
class=
"com.alibaba.otter.canal.meta.ZooKeeperMetaManager"
>
<property
name=
"zkClientx"
ref=
"zkClientx"
/>
</bean>
</property>
<property
name=
"period"
value=
"${canal.zookeeper.flush.period:1000}"
/>
</bean>
<bean
id=
"eventStore"
class=
"com.alibaba.otter.canal.store.memory.MemoryEventStoreWithBuffer"
>
<property
name=
"bufferSize"
value=
"${canal.instance.memory.buffer.size:16384}"
/>
<property
name=
"bufferMemUnit"
value=
"${canal.instance.memory.buffer.memunit:1024}"
/>
<property
name=
"batchMode"
value=
"${canal.instance.memory.batch.mode:MEMSIZE}"
/>
<property
name=
"ddlIsolation"
value=
"${canal.instance.get.ddl.isolation:false}"
/>
</bean>
<bean
id=
"eventSink"
class=
"com.alibaba.otter.canal.sink.entry.EntryEventSink"
>
<property
name=
"eventStore"
ref=
"eventStore"
/>
</bean>
<bean
id=
"eventParser"
class=
"com.alibaba.otter.canal.parse.inbound.mysql.MysqlEventParser"
>
<property
name=
"destination"
value=
"${canal.instance.destination}"
/>
<property
name=
"slaveId"
value=
"${canal.instance.mysql.slaveId:1234}"
/>
<!-- 心跳配置 -->
<property
name=
"detectingEnable"
value=
"${canal.instance.detecting.enable:false}"
/>
<property
name=
"detectingSQL"
value=
"${canal.instance.detecting.sql}"
/>
<property
name=
"detectingIntervalInSeconds"
value=
"${canal.instance.detecting.interval.time:5}"
/>
<property
name=
"haController"
>
<bean
class=
"com.alibaba.otter.canal.parse.ha.HeartBeatHAController"
>
<property
name=
"detectingRetryTimes"
value=
"${canal.instance.detecting.retry.threshold:3}"
/>
<property
name=
"switchEnable"
value=
"${canal.instance.detecting.heartbeatHaEnable:false}"
/>
</bean>
</property>
<property
name=
"alarmHandler"
ref=
"alarmHandler"
/>
<!-- 解析过滤处理 -->
<property
name=
"eventFilter"
>
<bean
class=
"com.alibaba.otter.canal.filter.aviater.AviaterRegexFilter"
>
<constructor-arg
index=
"0"
value=
"${canal.instance.filter.regex:.*\..*}"
/>
</bean>
</property>
<property
name=
"eventBlackFilter"
>
<bean
class=
"com.alibaba.otter.canal.filter.aviater.AviaterRegexFilter"
>
<constructor-arg
index=
"0"
value=
"${canal.instance.filter.black.regex:}"
/>
<constructor-arg
index=
"1"
value=
"false"
/>
</bean>
</property>
<!-- 最大事务解析大小,超过该大小后事务将被切分为多个事务投递 -->
<property
name=
"transactionSize"
value=
"${canal.instance.transaction.size:1024}"
/>
<!-- 网络链接参数 -->
<property
name=
"receiveBufferSize"
value=
"${canal.instance.network.receiveBufferSize:16384}"
/>
<property
name=
"sendBufferSize"
value=
"${canal.instance.network.sendBufferSize:16384}"
/>
<property
name=
"defaultConnectionTimeoutInSeconds"
value=
"${canal.instance.network.soTimeout:30}"
/>
<!-- 解析编码 -->
<!-- property name="connectionCharsetNumber" value="${canal.instance.connectionCharsetNumber:33}" /-->
<property
name=
"connectionCharset"
value=
"${canal.instance.connectionCharset:UTF-8}"
/>
<!-- 解析位点记录 -->
<property
name=
"logPositionManager"
>
<bean
class=
"com.alibaba.otter.canal.parse.index.FailbackLogPositionManager"
>
<property
name=
"primary"
>
<bean
class=
"com.alibaba.otter.canal.parse.index.MemoryLogPositionManager"
/>
</property>
<property
name=
"failback"
>
<bean
class=
"com.alibaba.otter.canal.parse.index.MetaLogPositionManager"
>
<property
name=
"metaManager"
ref=
"metaManager"
/>
</bean>
</property>
</bean>
</property>
<!-- failover切换时回退的时间 -->
<property
name=
"fallbackIntervalInSeconds"
value=
"${canal.instance.fallbackIntervalInSeconds:60}"
/>
<!-- 解析数据库信息 -->
<property
name=
"masterInfo"
>
<bean
class=
"com.alibaba.otter.canal.parse.support.AuthenticationInfo"
>
<property
name=
"address"
value=
"${canal.instance.master.address}"
/>
<property
name=
"username"
value=
"${canal.instance.dbUsername:retl}"
/>
<property
name=
"password"
value=
"${canal.instance.dbPassword:retl}"
/>
<property
name=
"defaultDatabaseName"
value=
"${canal.instance.defaultDatabaseName:retl}"
/>
</bean>
</property>
<property
name=
"standbyInfo"
>
<bean
class=
"com.alibaba.otter.canal.parse.support.AuthenticationInfo"
>
<property
name=
"address"
value=
"${canal.instance.standby.address}"
/>
<property
name=
"username"
value=
"${canal.instance.dbUsername:retl}"
/>
<property
name=
"password"
value=
"${canal.instance.dbPassword:retl}"
/>
<property
name=
"defaultDatabaseName"
value=
"${canal.instance.defaultDatabaseName:retl}"
/>
</bean>
</property>
<!-- 解析起始位点 -->
<property
name=
"masterPosition"
>
<bean
class=
"com.alibaba.otter.canal.protocol.position.EntryPosition"
>
<property
name=
"journalName"
value=
"${canal.instance.master.journal.name}"
/>
<property
name=
"position"
value=
"${canal.instance.master.position}"
/>
<property
name=
"timestamp"
value=
"${canal.instance.master.timestamp}"
/>
</bean>
</property>
<property
name=
"standbyPosition"
>
<bean
class=
"com.alibaba.otter.canal.protocol.position.EntryPosition"
>
<property
name=
"journalName"
value=
"${canal.instance.standby.journal.name}"
/>
<property
name=
"position"
value=
"${canal.instance.standby.position}"
/>
<property
name=
"timestamp"
value=
"${canal.instance.standby.timestamp}"
/>
</bean>
</property>
<property
name=
"filterQueryDml"
value=
"${canal.instance.filter.query.dml:false}"
/>
<property
name=
"filterQueryDcl"
value=
"${canal.instance.filter.query.dcl:false}"
/>
<property
name=
"filterQueryDdl"
value=
"${canal.instance.filter.query.ddl:false}"
/>
<property
name=
"filterRows"
value=
"${canal.instance.filter.rows:false}"
/>
<property
name=
"filterTableError"
value=
"${canal.instance.filter.table.error:false}"
/>
<property
name=
"supportBinlogFormats"
value=
"${canal.instance.binlog.format}"
/>
<property
name=
"supportBinlogImages"
value=
"${canal.instance.binlog.image}"
/>
</bean>
</beans>
piplus-backend-v5-canal-docker/conf/spring/file-instance.xml
deleted
100755 → 0
View file @
64e8d56c
<?xml version="1.0" encoding="UTF-8"?>
<beans
xmlns=
"http://www.springframework.org/schema/beans"
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xmlns:tx=
"http://www.springframework.org/schema/tx"
xmlns:aop=
"http://www.springframework.org/schema/aop"
xmlns:lang=
"http://www.springframework.org/schema/lang"
xmlns:context=
"http://www.springframework.org/schema/context"
xsi:schemaLocation=
"http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.0.xsd
http://www.springframework.org/schema/lang http://www.springframework.org/schema/lang/spring-lang-2.0.xsd
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.0.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-2.5.xsd"
default-autowire=
"byName"
>
<!-- properties -->
<bean
class=
"com.alibaba.otter.canal.instance.spring.support.PropertyPlaceholderConfigurer"
lazy-init=
"false"
>
<property
name=
"ignoreResourceNotFound"
value=
"true"
/>
<property
name=
"systemPropertiesModeName"
value=
"SYSTEM_PROPERTIES_MODE_OVERRIDE"
/>
<!-- 允许system覆盖 -->
<property
name=
"locationNames"
>
<list>
<value>
classpath:canal.properties
</value>
<value>
classpath:${canal.instance.destination:}/instance.properties
</value>
</list>
</property>
</bean>
<bean
id=
"socketAddressEditor"
class=
"com.alibaba.otter.canal.instance.spring.support.SocketAddressEditor"
/>
<bean
class=
"org.springframework.beans.factory.config.CustomEditorConfigurer"
>
<property
name=
"propertyEditorRegistrars"
>
<list>
<ref
bean=
"socketAddressEditor"
/>
</list>
</property>
</bean>
<bean
id=
"instance"
class=
"com.alibaba.otter.canal.instance.spring.CanalInstanceWithSpring"
>
<property
name=
"destination"
value=
"${canal.instance.destination}"
/>
<property
name=
"eventParser"
>
<ref
local=
"eventParser"
/>
</property>
<property
name=
"eventSink"
>
<ref
local=
"eventSink"
/>
</property>
<property
name=
"eventStore"
>
<ref
local=
"eventStore"
/>
</property>
<property
name=
"metaManager"
>
<ref
local=
"metaManager"
/>
</property>
<property
name=
"alarmHandler"
>
<ref
local=
"alarmHandler"
/>
</property>
</bean>
<!-- 报警处理类 -->
<bean
id=
"alarmHandler"
class=
"com.alibaba.otter.canal.common.alarm.LogAlarmHandler"
/>
<bean
id=
"metaManager"
class=
"com.alibaba.otter.canal.meta.FileMixedMetaManager"
>
<property
name=
"dataDir"
value=
"${canal.file.data.dir:../conf}"
/>
<property
name=
"period"
value=
"${canal.file.flush.period:1000}"
/>
</bean>
<bean
id=
"eventStore"
class=
"com.alibaba.otter.canal.store.memory.MemoryEventStoreWithBuffer"
>
<property
name=
"bufferSize"
value=
"${canal.instance.memory.buffer.size:16384}"
/>
<property
name=
"bufferMemUnit"
value=
"${canal.instance.memory.buffer.memunit:1024}"
/>
<property
name=
"batchMode"
value=
"${canal.instance.memory.batch.mode:MEMSIZE}"
/>
<property
name=
"ddlIsolation"
value=
"${canal.instance.get.ddl.isolation:false}"
/>
</bean>
<bean
id=
"eventSink"
class=
"com.alibaba.otter.canal.sink.entry.EntryEventSink"
>
<property
name=
"eventStore"
ref=
"eventStore"
/>
</bean>
<bean
id=
"eventParser"
class=
"com.alibaba.otter.canal.parse.inbound.mysql.MysqlEventParser"
>
<property
name=
"destination"
value=
"${canal.instance.destination}"
/>
<property
name=
"slaveId"
value=
"${canal.instance.mysql.slaveId:1234}"
/>
<!-- 心跳配置 -->
<property
name=
"detectingEnable"
value=
"${canal.instance.detecting.enable:false}"
/>
<property
name=
"detectingSQL"
value=
"${canal.instance.detecting.sql}"
/>
<property
name=
"detectingIntervalInSeconds"
value=
"${canal.instance.detecting.interval.time:5}"
/>
<property
name=
"haController"
>
<bean
class=
"com.alibaba.otter.canal.parse.ha.HeartBeatHAController"
>
<property
name=
"detectingRetryTimes"
value=
"${canal.instance.detecting.retry.threshold:3}"
/>
<property
name=
"switchEnable"
value=
"${canal.instance.detecting.heartbeatHaEnable:false}"
/>
</bean>
</property>
<property
name=
"alarmHandler"
ref=
"alarmHandler"
/>
<!-- 解析过滤处理 -->
<property
name=
"eventFilter"
>
<bean
class=
"com.alibaba.otter.canal.filter.aviater.AviaterRegexFilter"
>
<constructor-arg
index=
"0"
value=
"${canal.instance.filter.regex:.*\..*}"
/>
</bean>
</property>
<property
name=
"eventBlackFilter"
>
<bean
class=
"com.alibaba.otter.canal.filter.aviater.AviaterRegexFilter"
>
<constructor-arg
index=
"0"
value=
"${canal.instance.filter.black.regex:}"
/>
<constructor-arg
index=
"1"
value=
"false"
/>
</bean>
</property>
<!-- 最大事务解析大小,超过该大小后事务将被切分为多个事务投递 -->
<property
name=
"transactionSize"
value=
"${canal.instance.transaction.size:1024}"
/>
<!-- 网络链接参数 -->
<property
name=
"receiveBufferSize"
value=
"${canal.instance.network.receiveBufferSize:16384}"
/>
<property
name=
"sendBufferSize"
value=
"${canal.instance.network.sendBufferSize:16384}"
/>
<property
name=
"defaultConnectionTimeoutInSeconds"
value=
"${canal.instance.network.soTimeout:30}"
/>
<!-- 解析编码 -->
<!-- property name="connectionCharsetNumber" value="${canal.instance.connectionCharsetNumber:33}" /-->
<property
name=
"connectionCharset"
value=
"${canal.instance.connectionCharset:UTF-8}"
/>
<!-- 解析位点记录 -->
<property
name=
"logPositionManager"
>
<bean
class=
"com.alibaba.otter.canal.parse.index.FailbackLogPositionManager"
>
<property
name=
"primary"
>
<bean
class=
"com.alibaba.otter.canal.parse.index.MemoryLogPositionManager"
/>
</property>
<property
name=
"failback"
>
<bean
class=
"com.alibaba.otter.canal.parse.index.MetaLogPositionManager"
>
<property
name=
"metaManager"
ref=
"metaManager"
/>
</bean>
</property>
</bean>
</property>
<!-- failover切换时回退的时间 -->
<property
name=
"fallbackIntervalInSeconds"
value=
"${canal.instance.fallbackIntervalInSeconds:60}"
/>
<!-- 解析数据库信息 -->
<property
name=
"masterInfo"
>
<bean
class=
"com.alibaba.otter.canal.parse.support.AuthenticationInfo"
>
<property
name=
"address"
value=
"${canal.instance.master.address}"
/>
<property
name=
"username"
value=
"${canal.instance.dbUsername:retl}"
/>
<property
name=
"password"
value=
"${canal.instance.dbPassword:retl}"
/>
<property
name=
"defaultDatabaseName"
value=
"${canal.instance.defaultDatabaseName:retl}"
/>
</bean>
</property>
<property
name=
"standbyInfo"
>
<bean
class=
"com.alibaba.otter.canal.parse.support.AuthenticationInfo"
>
<property
name=
"address"
value=
"${canal.instance.standby.address}"
/>
<property
name=
"username"
value=
"${canal.instance.dbUsername:retl}"
/>
<property
name=
"password"
value=
"${canal.instance.dbPassword:retl}"
/>
<property
name=
"defaultDatabaseName"
value=
"${canal.instance.defaultDatabaseName:retl}"
/>
</bean>
</property>
<!-- 解析起始位点 -->
<property
name=
"masterPosition"
>
<bean
class=
"com.alibaba.otter.canal.protocol.position.EntryPosition"
>
<property
name=
"journalName"
value=
"${canal.instance.master.journal.name}"
/>
<property
name=
"position"
value=
"${canal.instance.master.position}"
/>
<property
name=
"timestamp"
value=
"${canal.instance.master.timestamp}"
/>
</bean>
</property>
<property
name=
"standbyPosition"
>
<bean
class=
"com.alibaba.otter.canal.protocol.position.EntryPosition"
>
<property
name=
"journalName"
value=
"${canal.instance.standby.journal.name}"
/>
<property
name=
"position"
value=
"${canal.instance.standby.position}"
/>
<property
name=
"timestamp"
value=
"${canal.instance.standby.timestamp}"
/>
</bean>
</property>
<property
name=
"filterQueryDml"
value=
"${canal.instance.filter.query.dml:false}"
/>
<property
name=
"filterQueryDcl"
value=
"${canal.instance.filter.query.dcl:false}"
/>
<property
name=
"filterQueryDdl"
value=
"${canal.instance.filter.query.ddl:false}"
/>
<property
name=
"filterRows"
value=
"${canal.instance.filter.rows:false}"
/>
<property
name=
"filterTableError"
value=
"${canal.instance.filter.table.error:false}"
/>
<property
name=
"supportBinlogFormats"
value=
"${canal.instance.binlog.format}"
/>
<property
name=
"supportBinlogImages"
value=
"${canal.instance.binlog.image}"
/>
</bean>
</beans>
piplus-backend-v5-canal-docker/conf/spring/group-instance.xml
deleted
100755 → 0
View file @
64e8d56c
This diff is collapsed.
Click to expand it.
piplus-backend-v5-canal-docker/conf/spring/memory-instance.xml
deleted
100755 → 0
View file @
64e8d56c
<?xml version="1.0" encoding="UTF-8"?>
<beans
xmlns=
"http://www.springframework.org/schema/beans"
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xmlns:tx=
"http://www.springframework.org/schema/tx"
xmlns:aop=
"http://www.springframework.org/schema/aop"
xmlns:lang=
"http://www.springframework.org/schema/lang"
xmlns:context=
"http://www.springframework.org/schema/context"
xsi:schemaLocation=
"http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.0.xsd
http://www.springframework.org/schema/lang http://www.springframework.org/schema/lang/spring-lang-2.0.xsd
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.0.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-2.5.xsd"
default-autowire=
"byName"
>
<!-- properties -->
<bean
class=
"com.alibaba.otter.canal.instance.spring.support.PropertyPlaceholderConfigurer"
lazy-init=
"false"
>
<property
name=
"ignoreResourceNotFound"
value=
"true"
/>
<property
name=
"systemPropertiesModeName"
value=
"SYSTEM_PROPERTIES_MODE_OVERRIDE"
/>
<!-- 允许system覆盖 -->
<property
name=
"locationNames"
>
<list>
<value>
classpath:canal.properties
</value>
<value>
classpath:${canal.instance.destination:}/instance.properties
</value>
</list>
</property>
</bean>
<bean
id=
"socketAddressEditor"
class=
"com.alibaba.otter.canal.instance.spring.support.SocketAddressEditor"
/>
<bean
class=
"org.springframework.beans.factory.config.CustomEditorConfigurer"
>
<property
name=
"propertyEditorRegistrars"
>
<list>
<ref
bean=
"socketAddressEditor"
/>
</list>
</property>
</bean>
<bean
id=
"instance"
class=
"com.alibaba.otter.canal.instance.spring.CanalInstanceWithSpring"
>
<property
name=
"destination"
value=
"${canal.instance.destination}"
/>
<property
name=
"eventParser"
>
<ref
local=
"eventParser"
/>
</property>
<property
name=
"eventSink"
>
<ref
local=
"eventSink"
/>
</property>
<property
name=
"eventStore"
>
<ref
local=
"eventStore"
/>
</property>
<property
name=
"metaManager"
>
<ref
local=
"metaManager"
/>
</property>
<property
name=
"alarmHandler"
>
<ref
local=
"alarmHandler"
/>
</property>
</bean>
<!-- 报警处理类 -->
<bean
id=
"alarmHandler"
class=
"com.alibaba.otter.canal.common.alarm.LogAlarmHandler"
/>
<bean
id=
"metaManager"
class=
"com.alibaba.otter.canal.meta.MemoryMetaManager"
/>
<bean
id=
"eventStore"
class=
"com.alibaba.otter.canal.store.memory.MemoryEventStoreWithBuffer"
>
<property
name=
"bufferSize"
value=
"${canal.instance.memory.buffer.size:16384}"
/>
<property
name=
"bufferMemUnit"
value=
"${canal.instance.memory.buffer.memunit:1024}"
/>
<property
name=
"batchMode"
value=
"${canal.instance.memory.batch.mode:MEMSIZE}"
/>
<property
name=
"ddlIsolation"
value=
"${canal.instance.get.ddl.isolation:false}"
/>
</bean>
<bean
id=
"eventSink"
class=
"com.alibaba.otter.canal.sink.entry.EntryEventSink"
>
<property
name=
"eventStore"
ref=
"eventStore"
/>
</bean>
<bean
id=
"eventParser"
class=
"com.alibaba.otter.canal.parse.inbound.mysql.MysqlEventParser"
>
<property
name=
"destination"
value=
"${canal.instance.destination}"
/>
<property
name=
"slaveId"
value=
"${canal.instance.mysql.slaveId:1234}"
/>
<!-- 心跳配置 -->
<property
name=
"detectingEnable"
value=
"${canal.instance.detecting.enable:false}"
/>
<property
name=
"detectingSQL"
value=
"${canal.instance.detecting.sql}"
/>
<property
name=
"detectingIntervalInSeconds"
value=
"${canal.instance.detecting.interval.time:5}"
/>
<property
name=
"haController"
>
<bean
class=
"com.alibaba.otter.canal.parse.ha.HeartBeatHAController"
>
<property
name=
"detectingRetryTimes"
value=
"${canal.instance.detecting.retry.threshold:3}"
/>
<property
name=
"switchEnable"
value=
"${canal.instance.detecting.heartbeatHaEnable:false}"
/>
</bean>
</property>
<property
name=
"alarmHandler"
ref=
"alarmHandler"
/>
<!-- 解析过滤处理 -->
<property
name=
"eventFilter"
>
<bean
class=
"com.alibaba.otter.canal.filter.aviater.AviaterRegexFilter"
>
<constructor-arg
index=
"0"
value=
"${canal.instance.filter.regex:.*\..*}"
/>
</bean>
</property>
<property
name=
"eventBlackFilter"
>
<bean
class=
"com.alibaba.otter.canal.filter.aviater.AviaterRegexFilter"
>
<constructor-arg
index=
"0"
value=
"${canal.instance.filter.black.regex:}"
/>
<constructor-arg
index=
"1"
value=
"false"
/>
</bean>
</property>
<!-- 最大事务解析大小,超过该大小后事务将被切分为多个事务投递 -->
<property
name=
"transactionSize"
value=
"${canal.instance.transaction.size:1024}"
/>
<!-- 网络链接参数 -->
<property
name=
"receiveBufferSize"
value=
"${canal.instance.network.receiveBufferSize:16384}"
/>
<property
name=
"sendBufferSize"
value=
"${canal.instance.network.sendBufferSize:16384}"
/>
<property
name=
"defaultConnectionTimeoutInSeconds"
value=
"${canal.instance.network.soTimeout:30}"
/>
<!-- 解析编码 -->
<!-- property name="connectionCharsetNumber" value="${canal.instance.connectionCharsetNumber:33}" /-->
<property
name=
"connectionCharset"
value=
"${canal.instance.connectionCharset:UTF-8}"
/>
<!-- 解析位点记录 -->
<property
name=
"logPositionManager"
>
<bean
class=
"com.alibaba.otter.canal.parse.index.MemoryLogPositionManager"
/>
</property>
<!-- failover切换时回退的时间 -->
<property
name=
"fallbackIntervalInSeconds"
value=
"${canal.instance.fallbackIntervalInSeconds:60}"
/>
<!-- 解析数据库信息 -->
<property
name=
"masterInfo"
>
<bean
class=
"com.alibaba.otter.canal.parse.support.AuthenticationInfo"
>
<property
name=
"address"
value=
"${canal.instance.master.address}"
/>
<property
name=
"username"
value=
"${canal.instance.dbUsername:retl}"
/>
<property
name=
"password"
value=
"${canal.instance.dbPassword:retl}"
/>
<property
name=
"defaultDatabaseName"
value=
"${canal.instance.defaultDatabaseName:retl}"
/>
</bean>
</property>
<property
name=
"standbyInfo"
>
<bean
class=
"com.alibaba.otter.canal.parse.support.AuthenticationInfo"
>
<property
name=
"address"
value=
"${canal.instance.standby.address}"
/>
<property
name=
"username"
value=
"${canal.instance.dbUsername:retl}"
/>
<property
name=
"password"
value=
"${canal.instance.dbPassword:retl}"
/>
<property
name=
"defaultDatabaseName"
value=
"${canal.instance.defaultDatabaseName:retl}"
/>
</bean>
</property>
<!-- 解析起始位点 -->
<property
name=
"masterPosition"
>
<bean
class=
"com.alibaba.otter.canal.protocol.position.EntryPosition"
>
<property
name=
"journalName"
value=
"${canal.instance.master.journal.name}"
/>
<property
name=
"position"
value=
"${canal.instance.master.position}"
/>
<property
name=
"timestamp"
value=
"${canal.instance.master.timestamp}"
/>
</bean>
</property>
<property
name=
"standbyPosition"
>
<bean
class=
"com.alibaba.otter.canal.protocol.position.EntryPosition"
>
<property
name=
"journalName"
value=
"${canal.instance.standby.journal.name}"
/>
<property
name=
"position"
value=
"${canal.instance.standby.position}"
/>
<property
name=
"timestamp"
value=
"${canal.instance.standby.timestamp}"
/>
</bean>
</property>
<property
name=
"filterQueryDml"
value=
"${canal.instance.filter.query.dml:false}"
/>
<property
name=
"filterQueryDcl"
value=
"${canal.instance.filter.query.dcl:false}"
/>
<property
name=
"filterQueryDdl"
value=
"${canal.instance.filter.query.ddl:false}"
/>
<property
name=
"filterRows"
value=
"${canal.instance.filter.rows:false}"
/>
<property
name=
"filterTableError"
value=
"${canal.instance.filter.table.error:false}"
/>
<property
name=
"supportBinlogFormats"
value=
"${canal.instance.binlog.format}"
/>
<property
name=
"supportBinlogImages"
value=
"${canal.instance.binlog.image}"
/>
</bean>
</beans>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment