代码拉取完成,页面将自动刷新
同步操作将从 sxfad/porter 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
兼容v0.3.2+,包括v0.3.2
spring-boot配置文件,可配置运行环境(spring.profiles.active)等,详情参考spring-boot官方文档。
同样可通过startup.sh脚本指定上述参数,例如 startup.sh --logging.level.root=debug
spring-boot配置文件,不同运行环境的配置文件。
任务配置文件
不同的环境(${env})的任务配置在config/tasks目录的不同子目录。
spring-boot配置参数,默认logging.file=${app.home}/logs/data-porter.log。
其中${app.home}是在启动脚本中指定的,指的是datas-porter的根目录
用于指定任务节点编号,在所属分布式环境中唯一。用于自描述并在zookeeper上报心跳、实现分布式锁。
eg.
porter.id=100
是否上传统计信息,包括日志、TPS指标.
类型:Boolean
分布式集群实现,当前仅支持zookeeper
指定分布式集群的实现策略
eg.
porter.cluster.strategy=ZOOKEEPER
集群连接参数
eg.
porter.cluster.client.url=127.0.0.1:2181
集群连接超时时间
eg.
porter.cluster.client.sessionTimeout=超时时间,单位为毫秒。
告警策略驱动,当前仅支持邮件
指定告警方式
eg.
porter.alert.strategy=EMAIL
相同内容通知接收频率
eg.
porter.alert.frequencyOfSeconds=60
porter.alert.client.host=smtp服务器
porter.alert.client.username=邮箱
porter.alert.client.password=密码
porter.alert.client.smtpAuth=true
porter.alert.client.smtpStarttlsEnable=true
porter.alert.client.smtpStarttlsRequired=false
全局告警通知人
类型:ArrayList
porter.alert.receiver[index].realName=姓名
porter.alert.receiver[index].email=邮箱
porter.alert.receiver[index].phone=手机号
当多个任务目标端和源端共用数据库连接池时配置,用于节省数据库链接资源。
类型:Map
源类型
类型:enum
可选参数:JDBC
多个用逗号隔开
eg.
porter.source.命名名字.url=jdbc连接
账户名
eg.
porter.source.命名名字.userName=账户
密码
eg.
porter.source.命名名字.password=密码
连接错误重试次数
类型:Int
类型:Enum
可选参数:MYSQL、 ORACLE
类型:Boolean
当目标端表无主键时,默认全部字段为主键
默认true
节点任务
类型:ArrayList
任务编号
类型:String
eg.
porter.task[index].taskId=1
当前任务告警通知人
任务告警会通知到porter.task[index].receiver + porter.alert.receiver
类型:ArrayList
porter.task[index].receiver[index].realName=姓名
porter.task[index].receiver[index].email=邮箱
porter.task[index].receiver[index].phone=手机号
任务消费源配置
类型:DataConsumerConfig
消费器插件
类型:String
可选择参数:CanalFetch、KafkaFetch
消息转换器
类型:String
可选择参数:canalRow(1.0新增)、oggJson
消费器数据来源
类型:Map
CanalFetch:(1.0新增)
porter.task[index].consumer.source.sourceType=CANAL
porter.task[index].consumer.source.slaveId=mysql slaveId
porter.task[index].consumer.source.address=ip:port
porter.task[index].consumer.source.database=数据库名
porter.task[index].consumer.source.username=账户
porter.task[index].consumer.source.password=密码
porter.task[index].consumer.source.filter=订阅表正则
KafkaFetch:
porter.task[0].consumer.source.sourceType=KAFKA
porter.task[0].consumer.source.servers=ip:port,ip:port
porter.task[0].consumer.source.topics=主题
porter.task[0].consumer.source.group=消费分组
porter.task[0].consumer.source.autoCommit=true|false
元数据数据源
类型:Map
不做配置时,将不会做源端与目标端数据一致对比。(1.1新增规则)
形式1:
porter.task[index].consumer.metaSource.sourceName=公共数据源名字
形式2:
porter.task[index].consumer.metaSource.dbType
porter.task[index].consumer.metaSource.url
porter.task[index].consumer.metaSource.userName
porter.task[index].consumer.metaSource.password
porter.task[index].consumer.metaSource.maxWait
porter.task[index].consumer.metaSource.minPoolSize
porter.task[index].consumer.metaSource.maxPoolSize
porter.task[index].consumer.metaSource.initialPoolSize
porter.task[index].consumer.metaSource.connectionErrorRetryAttempts
自定义同步数据数据抽取器
格式:package.className
class路径、jar路径、源码内容
空查询通知间隔,单位秒
默认3600
空查询通知时间阀值,单位秒
-1时不生效,默认3600
任务载入器配置
类型:DataLoaderConfig
目标端载入器插件
类型:Enum
可选参数:JdbcBatch、JdbcSingle
目标端数据源
类型:Map
形式1:
porter.task[index].loader.source.sourceName=公共数据源名字
形式2:
porter.task[index].loader.source.dbType
porter.task[index].loader.source.url
porter.task[index].loader.sourceuserName
porter.task[index].loader.source.password
porter.task[index].loader.source.maxWait
porter.task[index].loader.source.minPoolSize
porter.task[index].loader.source.maxPoolSize
porter.task[index].loader.source.initialPoolSize
porter.task[index].loader.source.connectionErrorRetryAttempts
目标端更新失败转插入开关参数,默认开启
类型:Boolean
源端与目标端schema映射,用于处理源端和目标端命名不一致的情况
类型:List
porter.task[index].mapper[index].schema=源端schema,目标端schema
porter.task[index].mapper[index].table=源端表名,目标端表名
如果不配置或配置错误,数据同步结果检查功能不启用
porter.task[index].mapper[下标].updateDate=源端表自动更新时间字段,目标端表自动更新时间字段
字段映射,可不配置。
porter.task[index].mapper[下标].column.源端字段名=目标端字段名
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。