英文:
Problem with cassandra-connector at "load()"
问题
我成功下载了这个连接器:com.datastax.spark:spark-cassandra-connector_2.11:2.5.1
当我尝试使用以下代码加载信息时:
data = sparkSession.read.format("org.apache.spark.sql.cassandra").options(table="tbthesis", keyspace="test").load()
我遇到了以下错误:
Exception has occurred: Py4JJavaError
An error occurred while calling o48.load.
: java.lang.ClassNotFoundException: Failed to find data source: org.apache.spark.sql.cassandra.
Please find packages at http://spark.apache.org/third-party-projects.html
除了错误建议的“寻找另一个连接器”之外,还有其他想法吗?实际上,这正是许多专业人士建议我使用的连接器,因此我认为问题可能出在别的地方。
谢谢!
英文:
I downloaded succesfully this connector: com.datastax.spark:spark-cassandra-connector_2.11:2.5.1
And when I try to load the information with this line:
data = sparkSession.read.format("org.apache.spark.sql.cassandra").options(table="tbthesis",
keyspace="test").load()
I get this error:
Exception has occurred: Py4JJavaError
An error occurred while calling o48.load.
: java.lang.ClassNotFoundException: Failed to find data source: org.apache.spark.sql.cassandra.
Please find packages at http://spark.apache.org/third-party-projects.html
Any ideas besides what the error suggests about "Look for another connector"? Indeed, this is the connector which several professionals have suggested me to use, hence it most be something else I think.
Thanks!
答案1
得分: 1
我的问题已经解决,我必须下载:
--packages com.datastax.spark:spark-cassandra-connector_2.12:2.5.1
这是适用于我的Scala版本(2.12.10)的正确连接器。
感谢大家的支持!
英文:
My problem is solved, I had to download:
--packages com.datastax.spark:spark-cassandra-connector_2.12:2.5.1
which is the right connector for my scala version: 2.12.10
Thank you all for your support!
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论