0

We are upgrading the Scala Spark

Spark from 2.4.3 to 3.1.3 scalaVersion from 2.11.8 to 2.12.10 spark-cassandra-connector from 2.4.2 to 3.1.0 Cassandra version 3.2 and all the subsequent dependancies.

We are facing following issues,

[error] cassandra/CatalogConnector.scala:20:16: overloaded method value execute with alternatives:

[error]   (x$1: com.datastax.dse.driver.api.core.graph.GraphStatement[_])com.datastax.dse.driver.api.core.graph.GraphResultSet <and>

[error]   (x$1: String,x$2: Object*)com.datastax.oss.driver.api.core.cql.ResultSet <and>
[error]   (x$1: String)com.datastax.oss.driver.api.core.cql.ResultSet <and>
[error]   (x$1: com.datastax.oss.driver.api.core.cql.Statement[_])com.datastax.oss.driver.api.core.cql.ResultSet
[error]  cannot be applied to (com.datastax.driver.core.querybuilder.Select)
[error]               .execute(
[error]                ^

We tried different option but did not help

Erick Ramirez
  • 13,964
  • 1
  • 18
  • 23
  • [How to create a Minimal, Reproducible Example](https://stackoverflow.com/help/minimal-reproducible-example) – Dmytro Mitin Feb 07 '23 at 16:24
  • 1
    Welcome to Stack Overflow! Your question is missing a few details. The general guidance is that you (a) provide a good summary of the problem that includes software/component versions, the full error message + full stack trace; (b) describe what you've tried to fix the problem, details of investigation you've done; and (c) minimal sample code that replicates the problem. I highly recommend https://stackoverflow.com/tour to familiarise yourself with the site. Cheers! – Erick Ramirez Feb 08 '23 at 03:52

1 Answers1

1

Based on this error message:

[error]   (x$1: com.datastax.dse.driver.api.core.graph.GraphStatement[_])com.datastax.dse.driver.api.core.graph.GraphResultSet <and>

I'm going to assume that you are connecting to a DataStax Enterprise (DSE) cluster using an older DSE Java driver but are now trying to connect using the open-source Cassandra Java driver.

In any case, the latest version of DSE 6.8 ships with Apache Spark 2.4 so it is not compatible with Apache Spark 3.1. Consequently, you need to use the Spark Cassandra connector that ships with DSE because the open-source version 3.1.0 of the connector is not compatible with DSE.

I have to admit, I am not sure this is the issue you are facing due to the very little information you provided. As a rule, you need to provide more details about the problem you're facing, your environment, a minimal sample code, and steps to replicate the issue. Cheers!

Erick Ramirez
  • 13,964
  • 1
  • 18
  • 23