We used DSE4.8.3 Cassandra to run CDH5.5.0 Spark in oozie, just found that DSE Cassandra has guava-16.0.1.jar conflict issue as following.
Failing Oozie Launcher, Main class [org.apache.oozie.action.hadoop.SparkMain], main() threw exception, com.google.common.reflect.TypeToken.isPrimitive()Z java.lang.NoSuchMethodError: com.google.common.reflect.TypeToken.isPrimitive()Z
Cassandra version in DSE 4.8.3 was 2.1.11.969. Spark version in CDH 5.5.0 was 1.5.0. For cassandra driver and connector.
1.If we used cassandra-driver-core-2.2.0-rc3.jar and spark-cassandra-connector_2.10-1.5.0-M2.jar, which both used guava-16.0.1.jar as their dependencies, it threw above exception "Method not found: com.google.common.reflect.TypeToken.isPrimitive()Z" in CDH (CDH5.5.0 spark used guava-14.0.1.jar, not guava-16.0.1.jar ).
2.If we used lower version cassandra-driver-core-2.2.0-rc1.jar and spark-cassandra-connector_2.10-1.5.0-M1.jar, which both used guava-14.0.1.jar as their dependencies, it threw following exception: Exception in thread "main" java.lang.AbstractMethodError: com.datastax.spark.connector.cql.LocalNodeFirstLoadBalancingPolicy.close()V
at com.datastax.driver.core.Cluster$Manager.close(Cluster.java:1417)
at com.datastax.driver.core.Cluster$Manager.access$200(Cluster.java:1167)
at com.datastax.driver.core.Cluster.closeAsync(Cluster.java:461)
at com.datastax.driver.core.Cluster.close(Cluster.java:472)
at com.datastax.spark.connector.cql.CassandraConnector$.com$datastax$spark$connector$cql$CassandraConnector$$createSession(CassandraConnector.scala:163)
I found an answer for this exception:(saying that using upper version spark-cassandra-connector_2.10-1.5.0-M2.jar will resolve the issue) Spark + Cassandra connector fails with LocalNodeFirstLoadBalancingPolicy.close()
So now, we are mystified with the Cassandra dependencies issue. How to fix this cassandra guava-16.0.1 dependency issue? Is it possible to build a new spark-cassandra-connector.jar fixing with both issues? Can you help to resolve this issue? Thanks!