liukelin / canal_mysql_nosql_sync Goto Github PK
View Code? Open in Web Editor NEW基于canal 的 mysql 与 redis/memcached/mongodb 的 nosql 数据实时同步方案 案例 demo canal client
基于canal 的 mysql 与 redis/memcached/mongodb 的 nosql 数据实时同步方案 案例 demo canal client
估计项目应该用在有米和酷狗了,是否发生过缓存故障的问题,根据以往经验,redis还是会偶尔出现超时,获取不到数据等问题,而且这样子是否也存在存储浪费的问题
connect error!
Exception in thread "main" redis.clients.jedis.exceptions.JedisDataException: NOAUTH Authentication required.
at redis.clients.jedis.Protocol.processError(Protocol.java:127)
at redis.clients.jedis.Protocol.process(Protocol.java:161)
at redis.clients.jedis.Protocol.read(Protocol.java:215)
at redis.clients.jedis.Connection.readProtocolWithCheckingBroken(Connection.java:340)
at redis.clients.jedis.Connection.getIntegerReply(Connection.java:265)
at redis.clients.jedis.Jedis.rpush(Jedis.java:865)
at canal.client.redis.push_redis(redis.java:37)
at canal.client.CanalClientTest.printEntry(CanalClientTest.java:319)
at canal.client.CanalClientTest.main(CanalClientTest.java:242)
create table命令无法被同步?是不是有bug?
connector.subscribe(".\..");
哥 把这句去掉吧 会导致服务端的配置失效 或者 你这里面加一个配置读取吧
配置中没有Redis的database设置,默认是db0吗?
不好意思 我不是搞java的 如何根据源码编译您这个项目 然后输出canal_client_1.0.22.2.zip
#=====canal client====================
#=====2016====================
#=====liukelin====================
#=====conf:/root/ali_canal_client/conf/canal.properties
#=====host:192.168.1.120:11111
#=====instance:example
connect success!
startup...
java.util.concurrent.TimeoutException
at com.rabbitmq.utility.BlockingCell.get(BlockingCell.java:76)
at com.rabbitmq.utility.BlockingCell.uninterruptibleGet(BlockingCell.java:110)
at com.rabbitmq.utility.BlockingValueOrException.uninterruptibleGetValue(BlockingValueOrException.java:36)
at com.rabbitmq.client.impl.AMQChannel$BlockingRpcContinuation.getReply(AMQChannel.java:366)
at com.rabbitmq.client.impl.AMQConnection.start(AMQConnection.java:292)
at com.rabbitmq.client.ConnectionFactory.newConnection(ConnectionFactory.java:824)
at com.rabbitmq.client.ConnectionFactory.newConnection(ConnectionFactory.java:778)
at com.rabbitmq.client.ConnectionFactory.newConnection(ConnectionFactory.java:868)
at canal.client.rabbitmq.push_rabbitmq(rabbitmq.java:50)
at canal.client.CanalClientTest.printEntry(CanalClientTest.java:315)
at canal.client.CanalClientTest.main(CanalClientTest.java:242)
connection rabbitmq error!
connect error!
Exception in thread "main" java.lang.NullPointerException
at canal.client.rabbitmq.push_rabbitmq(rabbitmq.java:56)
at canal.client.CanalClientTest.printEntry(CanalClientTest.java:315)
at canal.client.CanalClientTest.main(CanalClientTest.java:242)
如题,然后就退出了
想做个mysql的跨机房镜像,现在好像只支持同步到redis和mongo.同步到mysql,不同表表结构不一样 应该怎么操作?
3.为了避免多进程对MQ消费速度的时序先后不可控,建议binlog数据只作为触发条件(使用id从mysql获取最新数据)作为数据使用,而不作为具体数据使用。
然后提2点建议,看脚本是不是可以优化下。
1、历时数据同步。。。(标题说的那样)
2、如果mongo没有库dbs、表collections的情况下,是否可以自动创建呢?
######写入redis ######
#持久化自行设置 RDB/AOF
redis.host = 127.0.0.1
redis.port = 5672
redis.user =
redis.pass =
redis.queuename = canal_binlog_data
你好,我按照你那个例子进行测试,print和写入mq的数据中文都是乱码"???"
我server端配置的canal.instance.connectionCharset = UTF-8
数据库db和表也都是utf8,但是client端出来的中文都是乱码,请问还需要哪里配置吗?
请问一下,能否提供一个同步到mongodb的例子,感谢!
如果canal突然挂了,或者有段时间没运行,增量是否会丢失
我看到这里写到,3.MQ对解析后binlog增量数据的推送,请问如果mysql所在的服务器断电重启了(假设redis这边也断电重启了),重启后会一次性把所有的binlog数据重新推送吗?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.