mirror of
https://github.com/alibaba/canal.git
synced 2026-11-04 00:30:15 +08:00
Updated Sync ES (markdown)
24
Sync-ES.md
24
Sync-ES.md
@@ -7,29 +7,23 @@ canal adapter 的 Elastic Search 版本支持6.x.x以上, 如需其它版本的e
|
|||||||
## ElasticSearch适配器
|
## ElasticSearch适配器
|
||||||
### 1 修改启动器配置: application.yml
|
### 1 修改启动器配置: application.yml
|
||||||
```
|
```
|
||||||
server:
|
|
||||||
port: 8081
|
|
||||||
logging:
|
|
||||||
level:
|
|
||||||
com.alibaba.otter.canal.client.adapter.es: DEBUG
|
|
||||||
spring:
|
|
||||||
jackson:
|
|
||||||
date-format: yyyy-MM-dd HH:mm:ss
|
|
||||||
time-zone: GMT+8
|
|
||||||
default-property-inclusion: non_null
|
|
||||||
|
|
||||||
canal.conf:
|
canal.conf:
|
||||||
canalServerHost: 127.0.0.1:11111
|
canalServerHost: 127.0.0.1:11111
|
||||||
flatMessage: true
|
batchSize: 500
|
||||||
|
syncBatchSize: 1000
|
||||||
|
retries: 0
|
||||||
|
timeout:
|
||||||
|
mode: tcp
|
||||||
srcDataSources:
|
srcDataSources:
|
||||||
defaultDS:
|
defaultDS:
|
||||||
url: jdbc:mysql://127.0.0.1:3306/mytest?useUnicode=true
|
url: jdbc:mysql://127.0.0.1:3306/mytest?useUnicode=true
|
||||||
username: root
|
username: root
|
||||||
password: 121212
|
password: 121212
|
||||||
canalInstances:
|
canalAdapters:
|
||||||
- instance: example
|
- instance: example
|
||||||
adapterGroups:
|
groups:
|
||||||
- outAdapters:
|
- groupId: g1
|
||||||
|
outerAdapters:
|
||||||
- name: es
|
- name: es
|
||||||
hosts: 127.0.0.1:9300 # es 集群地址, 逗号分隔
|
hosts: 127.0.0.1:9300 # es 集群地址, 逗号分隔
|
||||||
properties:
|
properties:
|
||||||
|
|||||||
Reference in New Issue
Block a user