RJDBC Cassandra -> Error in .jfindClass(as.character(driverClass)[1]) : class not found

后端 未结 5 1845
长发绾君心
长发绾君心 2021-01-02 11:44

I am trying to connect R to Cassandra and I am getting the following error - even though I explicitly add this directory folder to the classpath before I run the code (and I

5条回答
  •  时光取名叫无心
    2021-01-02 12:07

    Cassandra JDBC driver v1.2.5 does not work with Cassandra 2.* and is very very deprecated, still uses the thrift API and does only connect to a single node.

    You should grab the new version I made that uses the Datastax Java Driver underneath : https://github.com/adejanovski/java-driver

    Here's a link to the compiled version with all the necessary dependencies : https://drive.google.com/file/d/0B7fwX0DqcWSTLUFqSEMxVFVWY2M/view?usp=sharing

    Use the appropriate driver class and JDBC url as shown on this page : https://github.com/adejanovski/java-driver/tree/2.1/driver-jdbc

    Another more efficient option (though I'm not familiar with R) should be to use R on Spark and access Cassandra through the spark-cassandra connector provided by Datastax.

提交回复
热议问题