# Making Hadoop 2.6 + Spark-Cassandra Driver Play Nice Together

We have been using Spark Standalone deploy for more than one year now, but recently I tried to use Azure’s HDInsight which runs on Hadoop 2.6 (YARN deploy).

After provisioning the servers, all small tests worked fine, I have been able to run Spark-Shell, read and write to Blob Storage, until I tried to write to Datastax Cassandra cluster which constantly returned a error message: Exception in thread "main" java.io.IOException: Failed to open native connection to Cassandra at {10.0.1.4}:9042

I have to confess I am a little bit ashamed of spending a lot of time on the Failed to open native connection to Cassandra at {10.0.1.4}:9042 error part, instead of looking for the original cause, which was: java.lang.NoSuchMethodError: com.google.common.util.concurrent.Futures.withFallback

After spending a few hours making sure the network part was indeed correctly configured, I starting looking for the error com.google.common.util.concurrent.Futures.withFallback, I found a lot people asking questions about:

And the most significant discussions that led me to the solution were:

## Solution

After reading those tickets the solution was pretty obvious, all I had to do was to shade Guava on my package, which is pretty simple considering I’m using the latest version of sbt-assembly. All I had to do was change the references of com.google.** to rename classes as shadeio.** and everything worked as it should be!

Below a snippet of my project/assembly.sbt and build.sbt files:

I hope this make fixing this issue easier than it was to me :)

.