使用datastax收听Cassandra数据库 [英] Listen to a cassandra database with datastax

查看:177
本文介绍了使用datastax收听Cassandra数据库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

每次使用datastax为Java添加cassandra数据库时,如何从cassandra数据库中获取记录?也就是说,如何监听" cassandra数据库?谢谢

How can I get a record from cassandra database every time that it is add using datastax for java? That is, how can I "listen" cassandra database? Thanks

推荐答案

没有简单的方法可以做到这一点. Cassandra具有更改数据捕获功能,但功能水平很低(并且可能取决于Cassandra的版本),而且使用起来并不容易.您可以编写自己的实现(上面链接中的指针),或使用类似的方法,但它已经很旧了.而且您需要自己处理重复数据删除,因为当RF> 1时,每个节点都会收到&写入数据.

There is no easy way to do it. Cassandra has Change Data Capture functionality, but it's quite low level (and could depend on version of Cassandra), and it's not easy to use it. You can write your own implementation (pointers in link above), or use something like this, but it's very old. And you'll need to handle deduplication yourself, as when you have RF > 1, every node will receive & write the data.

这篇关于使用datastax收听Cassandra数据库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆