简体   繁体   English

如何使用Java将Cassandra与Spark连接。

[英]How to connect Cassandra with Spark using Java.

I am new to Spark and need help with implementing a simple program with Spark and connecting to cassandra. 我是Spark的新手,需要使用Spark实现一个简单程序并连接到cassandra的帮助。

http://spark.apache.org/docs/latest/programming-guide.html http://spark.apache.org/docs/latest/programming-guide.html

If any one can come up with a working solution and build the above as a JAR file it will be a good kickstart for me. 如果有人可以提出一个可行的解决方案并将其作为JAR文件构建,这对我来说将是一个不错的开始。

I have successfully installed Spark as well as Cassandra and both are running on my local machine. 我已经成功安装了Spark和Cassandra,并且两者都在本地计算机上运行。

Have a look at the Spark Cassandra connector here . 这里看看Spark Cassandra连接器。

It has some example programs for Java. 它有一些Java的示例程序。 It takes some effort to set it up, so you'll need to read the documentation in the github project. 设置它需要花费一些精力,因此您需要阅读github项目中的文档。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM