Coder Social home page Coder Social logo

hellobike / amazonriver Goto Github PK

View Code? Open in Web Editor NEW
220.0 19.0 58.0 337 KB

amazonriver 是一个将postgresql的实时数据同步到es或kafka的服务

License: Apache License 2.0

Go 100.00%
pg postgresql replication wal es elasticsearch kafka sync stream go

amazonriver's Issues

同步es时,历史数据pg_dump_path怎么个用法?

pg_dump_path 指向的pg_dump 备份文件 有什么要求?是 sql 还是二进制?文件后缀有没有要求?
我都试了,没效果,能提供pg_dump 的命令示例吗?
我是这样创建的备份文件:
pg_dump -h 10.168.4.91 -p 5321 -U postgres -W -F p -b -v -f "/opt/amazonriver/xzdssituation_p.sql" xzdssituation

这样配置的
"pg_dump_path": "/opt/amazonriver/xzdssituation_p.sql",
"subscribes": [{
"dump": true,

dump 历史数据无效

运行环境:win10
数据库环境:pg 10.9.0
es版本:7.4
已经将pg_dump 配置到环境变量了
配置信息:
{
"pg_dump_path": "",
"subscribes": [{
"dump": true,
"slotName": "tms_for_es",
"pgConnConf": {
"host": "127.0.0.1",
"port": 5432,
"database": "pg2",
"user": "postgres",
"password": "post"
},
"rules": [
{
"table": "product",
"pks": ["tid"],
"esid": ["id"],
"index": "product_name",
"type": "string"
},
{
"table": "version_object",
"pks": ["tid"],
"esid": ["id"],
"index": "version",
"type": "string"
}
],
"esConf": {
"addrs": "http://localhost:9200",
"user": "",
"password": ""
},
"retry": -1
}]
}

数据没有写入我的kafka

您好,我用amazonriver从PG同步到kafka,数据读取正常,但是未写入对应kafka的topic中,只是把数据打印到了终端,请问是不是我的配置或者操作存在问题:
kafka版本:0.10.2.0
postgresql版本:9.6.12

1.下载文件:amazonriver-linux-amd64.zip
2.解压后执行:./amazonriver -config kafka.conf
kafka.conf 文件配置信息如下:
{
"pg_dump_path": "",
"subscribes": [{
"dump": false,
"slotName": "slot_for_kafka",
"pgConnConf": {
"host": "192.168.216.87",
"port": 6432,
"database": "grabdb",
"user": "replica",
"password": "*****“
},
"rules": [
{
"table": "db40.dbm_monitor_timeliness",
"pks": ["table_name"],
"topic": "dbm_monitor_timeliness"
}
],
"kafkaConf": {
"addrs": ["192.168.200.94:9092"]
},
"retry": 0
}],
"prometheus_address": ":8080"
}
3.kafka的topic:dbm_monitor_timeliness信息如下
Topic:dbm_monitor_timeliness PartitionCount:1 ReplicationFactor:3 Configs:
Topic: dbm_monitor_timeliness Partition: 0 Leader: 3 Replicas: 3,2,1 Isr: 3,2,1

handle replication msg err: invalid pgoutput msg: invalid parser end state: 4

PGSQL 中执行TRUNCATE table test报错

time="2020-01-17T18:07:42+08:00" level=info msg="handle wal data: &{BEGIN   map[] 1579255662349 4169506000 <nil>}"
time="2020-01-17T18:07:42+08:00" level=error msg="handle replication msg err: invalid pgoutput msg: invalid parser end state: 4"
time="2020-01-17T18:07:42+08:00" level=info msg="handle wal data: &{COMMIT   map[] 1579255662349 4169508368 <nil>}"

PGSQL:PostgreSQL 12.1 on x86_64-pc-linux-gnu, compiled by gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-39), 64-bit
amazonriver:1.0.3
ES:7.3

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.