I am running spark job on emr and using datastax connector to connect to cassandra cluster. I am facing issues with the guava jar please find the details as below I am using
I've had the same problem, and resolved it by using the maven Shade plugin to shade the guava version that the Cassandra connector brings in.
I needed to exclude the Optional, Present and Absent classes explicitly because I was running into issues with Spark trying to cast from the non-shaded Guava Present type to the shaded Optional type. I'm not sure if this will cause any problems later on, but it seems to be working for me for now.
You can add this to the
section in your pom.xml:
org.apache.maven.plugins
maven-shade-plugin
2.4.3
package
shade
true
true
fat
com.google
shaded.guava
com.google.**
com.google.common.base.Optional
com.google.common.base.Absent
com.google.common.base.Present
*:*
META-INF/*.SF
META-INF/*.DSA
META-INF/*.RSA