MongoShake icon indicating copy to clipboard operation
MongoShake copied to clipboard

将数据发送到kafka的topic中,checkpoint相关的信息应该如何配置

Open 13430647361 opened this issue 6 years ago • 2 comments

collector context storage mainly including store checkpoint.

checkpoint存储信息,checkpoint本身是一个64位的时间戳表示本次开始拉取的地址。

type include : database, api

for api storage, address is http url

for database storage, address is collection name while db name is "mongoshake" by default.

checkpoint存储的地址,database表示存储到MongoDB中,api表示提供http的接口写入checkpoint。

context.storage = database

context.storage.url is only used in to mark the checkpoint store database.

If the source mongodb type is sharding, the address should be config server when MongoShake's

version >= 1.5, otherwise, this is replicaSet address.

When source mongodb type is replicaSet, checkpoint will write into source mongodb as default

if context.storage.url is not set, otherwise, the checkpoint will be written into this

mongodb. E.g., mongodb://127.0.0.1:20070

checkpoint的具体写入的MongoDB地址,可以配目的端tunnel.address的地址

context.storage.url =

checkpoint db's name. if context.storage.url is config-server url, need set context.storage.db to admin

checkpoint存储的数据库名,如果context.storage.url配的是config-server,需要将该参数改为admin

context.storage.db = mongoshake

the prefix of all checkpoint collection's name.

checkpoint存储的表名前缀,作为所有checkpoint表的前缀

context.storage.collection = ckpt_default

这是原始的配置

13430647361 avatar Feb 21 '20 09:02 13430647361

checkpoint模式是写到源库的,无论同步的目的端是什么地方。如果想把checkpoint写到别的地方,可以配置context.storage.url参数

vinllen avatar Feb 22 '20 02:02 vinllen

目前修改context.storage.url参数为源mongodb信息,context.storage.db = mongoshake,mongoshake为在源库中新建的数据库,已经可以正常存放checkpoint信息

13430647361 avatar Feb 24 '20 06:02 13430647361