如何将kafka主题数据存储到cassandra中 [英] How to store kafka topic data into cassandra

查看:37
本文介绍了如何将kafka主题数据存储到cassandra中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已使用此参考链接安装了 cassandrahttps://linuxize.com/post/how-to-install-apache-cassandra-on-ubuntu-18-04/

I have installed cassandra using this reference link https://linuxize.com/post/how-to-install-apache-cassandra-on-ubuntu-18-04/

我还使用以下命令将 kafka 安装到我的 ubuntu 18.04 机器中https://www.digitalocean.com/community/tutorials/how-to-install-apache-kafka-on-ubuntu-18-04

Also I have installed kafka into my ubuntu 18.04 machine using https://www.digitalocean.com/community/tutorials/how-to-install-apache-kafka-on-ubuntu-18-04

现在我想将 kafka 主题数据存储到 cassandra 数据库.如果有人有想法,请帮助我.

Now I want to store kafka topic data to cassandra database. If any one have idea please help me.

我在过去 3 天里做了很多研究,但没有取得成功.我使用此链接实现了 cassandra sink,但它不起作用.因此,请在降低问题评分之前检查详细信息.

I have done so many research in it from last 3 days but didn't get success in it. I implemented cassandra sink using this link but it is not working. so please check details before you down rate the question.

http://itechseeker.com/en/tutorials-2/apache-cassandra/connecting-kafka-to-cassandra-sink/

推荐答案

您可以使用 DataStax Kafka 连接器 专为 Kafka Connect 框架构建(对于 DSE 和 OSS Cassandra 是免费的).它不需要您编写从 Kafka 写入 Cassandra 的代码 - 只需提供配置文件.该连接器针对吞吐量进行了大量优化,此外还有许多其他有用的选项,例如从单个主题写入多个 Cassandra 表(数据非规范化)等.

You can use DataStax Kafka Connector that is built for Kafka Connect framework (it's free for DSE & OSS Cassandra). It doesn't require you to write the code for writing from Kafka to Cassandra - just provide the configuration file. The connector is heavily optimized for throughput, plus it has many other useful options, as ability to write from single topic to multiple Cassandra tables (data denormalization), etc.

您可以在以下存储库中找到更多连接器使用示例.

You can find more examples of connector's usage in the following repository.

这篇关于如何将kafka主题数据存储到cassandra中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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