What Can I Do If Spark Failed to Connect to Cassandra?
Symptom
You used Spark to connect to the open-source Cassandra, data can be read properly, but an error was reported during the connection.
Error message is as follows.
Configuration Details
The following shows the components and account details.
- Component configuration details
Table 1 Configuration details Component
Version
spark-cassandra-connector
2.5.1
spark
2.5.1
Open-source Cassandra
3.11
scala
2.12
- User: user1 (created by user rwuser)
Possible Cause
- user1 does not have the permission to query the keyspace system.
- The Spark version is incorrect.
Solution
- Grant the keyspace system query permission to user1 as user rwuser.
- Use spark-cassandra-connector 2.4.1.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot