<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>question Re: Override libraries for spark in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Override-libraries-for-spark/m-p/32140#M7395</link>
    <description>&lt;P&gt;I've just tried a simple application with nothing but a Main class in the jar file. This is the code:&lt;/P&gt;&lt;PRE&gt;import org.apache.hadoop.hbase._
import org.apache.hadoop.hbase.mapreduce.TableInputFormat
import org.apache.hadoop.hbase.mapreduce.TableInputFormat
import org.apache.hadoop.hbase.mapreduce.TableOutputFormat
import org.apache.spark._

import org.apache.spark.rdd.NewHadoopRDD

object Main {

  def main(args: Array[String]) {
    val sc = new SparkContext(new SparkConf())

    val conf = HBaseConfiguration.create()

    conf.set(HConstants.ZOOKEEPER_QUORUM, "my.server")
    //config.set("hbase.zookeeper.property.clientPort","2181");
    val explicitNamespace: String = "BankData"
    val qualifiedTableName: String = explicitNamespace + ':' + "bank"

    conf.set(TableInputFormat.INPUT_TABLE, qualifiedTableName)
    conf.set(TableOutputFormat.OUTPUT_TABLE, qualifiedTableName)
    conf.set(TableInputFormat.INPUT_TABLE, "tmp")

    var hBaseRDD = sc.newAPIHadoopRDD(conf, classOf[TableInputFormat], classOf[org.apache.hadoop.hbase.io.ImmutableBytesWritable], classOf[org.apache.hadoop.hbase.client.Result])

  }

}&lt;/PRE&gt;&lt;P&gt;I run this with:&lt;/P&gt;&lt;PRE&gt;spark-submit --conf "spark.driver.userClassPathFirst=true" --conf "spark.executor.userClassPathFirst=true" --class Main --master yarn-cluster test2.jar &lt;/PRE&gt;&lt;P&gt;I got the following exception:&lt;/P&gt;&lt;PRE&gt;15/09/22 14:34:28 ERROR yarn.ApplicationMaster: User class threw exception: org.xerial.snappy.SnappyNative.maxCompressedLength(I)I
java.lang.UnsatisfiedLinkError: org.xerial.snappy.SnappyNative.maxCompressedLength(I)I
	at org.xerial.snappy.SnappyNative.maxCompressedLength(Native Method)
	at org.xerial.snappy.Snappy.maxCompressedLength(Snappy.java:316)
	at org.xerial.snappy.SnappyOutputStream.&amp;lt;init&amp;gt;(SnappyOutputStream.java:79)
	at org.apache.spark.io.SnappyCompressionCodec.compressedOutputStream(CompressionCodec.scala:157)
	at org.apache.spark.broadcast.TorrentBroadcast$$anonfun$4.apply(TorrentBroadcast.scala:199)
	at org.apache.spark.broadcast.TorrentBroadcast$$anonfun$4.apply(TorrentBroadcast.scala:199)
	at scala.Option.map(Option.scala:145)
	at org.apache.spark.broadcast.TorrentBroadcast$.blockifyObject(TorrentBroadcast.scala:199)
	at org.apache.spark.broadcast.TorrentBroadcast.writeBlocks(TorrentBroadcast.scala:101)
	at org.apache.spark.broadcast.TorrentBroadcast.&amp;lt;init&amp;gt;(TorrentBroadcast.scala:84)
	at org.apache.spark.broadcast.TorrentBroadcastFactory.newBroadcast(TorrentBroadcastFactory.scala:34)
	at org.apache.spark.broadcast.TorrentBroadcastFactory.newBroadcast(TorrentBroadcastFactory.scala:29)
	at org.apache.spark.broadcast.BroadcastManager.newBroadcast(BroadcastManager.scala:62)
	at org.apache.spark.SparkContext.broadcast(SparkContext.scala:1051)
	at org.apache.spark.rdd.NewHadoopRDD.&amp;lt;init&amp;gt;(NewHadoopRDD.scala:77)
	at org.apache.spark.SparkContext.newAPIHadoopRDD(SparkContext.scala:878)
	at Main$.main(Main.scala:29)
	at Main.main(Main.scala)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:497)
	at org.apache.spark.deploy.yarn.ApplicationMaster$$anon$2.run(ApplicationMaster.scala:480)&lt;/PRE&gt;&lt;P&gt;I'm running CDH 5.4.3&lt;/P&gt;</description>
    <pubDate>Tue, 22 Sep 2015 12:38:09 GMT</pubDate>
    <dc:creator>martins</dc:creator>
    <dc:date>2015-09-22T12:38:09Z</dc:date>
    <item>
      <title>Override libraries for spark</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Override-libraries-for-spark/m-p/32125#M7391</link>
      <description>&lt;P&gt;&amp;nbsp;Hello,&lt;/P&gt;&lt;P&gt;I would like to use newer version of some of the libraries listed in /etc/spark/conf/classpath.txt.&lt;/P&gt;&lt;P&gt;What is the recommended way to do that? I add other libraries using spark-submit's --jars (I have the jars on HDFS), but&lt;/P&gt;&lt;P&gt;this does not work with newer versions of libraries that are already in classpath.txt.&lt;/P&gt;&lt;P&gt;Alternatively, is there a way to disable construction of classpath.txt and rely solely on&amp;nbsp;libraries provided to the spark-submit (except spark and hadoop possibly)?&lt;/P&gt;&lt;P&gt;I'm running spark on yarn (cluster mode).&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;</description>
      <pubDate>Fri, 16 Sep 2022 09:41:30 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Override-libraries-for-spark/m-p/32125#M7391</guid>
      <dc:creator>martins</dc:creator>
      <dc:date>2022-09-16T09:41:30Z</dc:date>
    </item>
    <item>
      <title>Re: Override libraries for spark</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Override-libraries-for-spark/m-p/32130#M7392</link>
      <description>I wouldn't modify that file. Instead, include your libraries with your&lt;BR /&gt;app or using --jars, but also try setting&lt;BR /&gt;spark.{driver,executor}.userClassPathFirst to true. Resolving these&lt;BR /&gt;conflicts is tricky in Spark, where you use a library that Spark does&lt;BR /&gt;too and does not shade, but this is the answer in most cases.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 22 Sep 2015 09:36:55 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Override-libraries-for-spark/m-p/32130#M7392</guid>
      <dc:creator>srowen</dc:creator>
      <dc:date>2015-09-22T09:36:55Z</dc:date>
    </item>
    <item>
      <title>Re: Override libraries for spark</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Override-libraries-for-spark/m-p/32137#M7393</link>
      <description>&lt;P&gt;We have already tried setting the 2 "&lt;SPAN&gt;userClassPathFirst"&lt;/SPAN&gt; switches, but unfortunately, we ended up with same strange exception:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ERROR yarn.ApplicationMaster: User class threw exception: org.xerial.snappy.SnappyNative.maxCompressedLength(I)I&lt;BR /&gt;java.lang.UnsatisfiedLinkError: org.xerial.snappy.SnappyNative.maxCompressedLength(I)I&lt;BR /&gt;at org.xerial.snappy.SnappyNative.maxCompressedLength(Native Method)&lt;BR /&gt;at org.xerial.snappy.Snappy.maxCompressedLength(Snappy.java:316)&lt;BR /&gt;at org.xerial.snappy.SnappyOutputStream.&amp;lt;init&amp;gt;(SnappyOutputStream.java:79)&lt;BR /&gt;at org.apache.spark.io.SnappyCompressionCodec.compressedOutputStream(CompressionCodec.scala:157)&lt;BR /&gt;at org.apache.spark.broadcast.TorrentBroadcast$$anonfun$4.apply(TorrentBroadcast.scala:199)&lt;BR /&gt;at org.apache.spark.broadcast.TorrentBroadcast$$anonfun$4.apply(TorrentBroadcast.scala:199)&lt;BR /&gt;at scala.Option.map(Option.scala:145)&lt;BR /&gt;at org.apache.spark.broadcast.TorrentBroadcast$.blockifyObject(TorrentBroadcast.scala:199)&lt;BR /&gt;at org.apache.spark.broadcast.TorrentBroadcast.writeBlocks(TorrentBroadcast.scala:101)&lt;BR /&gt;at org.apache.spark.broadcast.TorrentBroadcast.&amp;lt;init&amp;gt;(TorrentBroadcast.scala:84)&lt;BR /&gt;at org.apache.spark.broadcast.TorrentBroadcastFactory.newBroadcast(TorrentBroadcastFactory.scala:34)&lt;BR /&gt;at org.apache.spark.broadcast.TorrentBroadcastFactory.newBroadcast(TorrentBroadcastFactory.scala:29)&lt;BR /&gt;at org.apache.spark.broadcast.BroadcastManager.newBroadcast(BroadcastManager.scala:62)&lt;BR /&gt;at org.apache.spark.SparkContext.broadcast(SparkContext.scala:1051)&lt;BR /&gt;at org.apache.spark.rdd.NewHadoopRDD.&amp;lt;init&amp;gt;(NewHadoopRDD.scala:77)&lt;BR /&gt;at org.apache.spark.SparkContext.newAPIHadoopRDD(SparkContext.scala:878)&lt;BR /&gt;at org.apache.spark.api.java.JavaSparkContext.newAPIHadoopRDD(JavaSparkContext.scala:516)&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What I don't understand is why there is SPARK_DIST_CLASSPATH being set at all. Vanilla spark installation has everything in the single jar&lt;/P&gt;&lt;P&gt;and any additional dependency must be specified explicitely, correct?&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Would it be possible to completely replace the classpath.txt with user provided dependencies?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thanks!&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 22 Sep 2015 11:23:24 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Override-libraries-for-spark/m-p/32137#M7393</guid>
      <dc:creator>martins</dc:creator>
      <dc:date>2015-09-22T11:23:24Z</dc:date>
    </item>
    <item>
      <title>Re: Override libraries for spark</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Override-libraries-for-spark/m-p/32138#M7394</link>
      <description>That's a different type of conflict. You have somehow a different&lt;BR /&gt;version of snappy in your app classpath, maybe? You aren't including&lt;BR /&gt;Spark/Hadoop in your app jar right?&lt;BR /&gt;&lt;BR /&gt;The Spark assembly only contains Hadoop jars if built that way, but in&lt;BR /&gt;a CDH cluster, that's not a good idea, as the cluster already has its&lt;BR /&gt;copy of Hadoop stuff. It's built as 'hadoop-provided' and the&lt;BR /&gt;classpath then contains Hadoop jars and dependencies, plus Spark's.&lt;BR /&gt;&lt;BR /&gt;Modifying this means modifying the distribution for all applications.&lt;BR /&gt;It may or may not work with the rest of CDH and may or may not work&lt;BR /&gt;with other apps. These modifications aren't supported, though you can&lt;BR /&gt;try whatever you want if you are OK with 'voiding the warranty' so to&lt;BR /&gt;speak.&lt;BR /&gt;&lt;BR /&gt;Spark classpath issues are tricky in general, not just in CDH, since&lt;BR /&gt;Spark uses a load of libraries and doesn't shade most of them. Yes,&lt;BR /&gt;you can try shading your own copies as a fall-back if the&lt;BR /&gt;classpath-first args don't work. But you might need to double-check&lt;BR /&gt;what you are trying to bring in.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 22 Sep 2015 11:30:55 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Override-libraries-for-spark/m-p/32138#M7394</guid>
      <dc:creator>srowen</dc:creator>
      <dc:date>2015-09-22T11:30:55Z</dc:date>
    </item>
    <item>
      <title>Re: Override libraries for spark</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Override-libraries-for-spark/m-p/32140#M7395</link>
      <description>&lt;P&gt;I've just tried a simple application with nothing but a Main class in the jar file. This is the code:&lt;/P&gt;&lt;PRE&gt;import org.apache.hadoop.hbase._
import org.apache.hadoop.hbase.mapreduce.TableInputFormat
import org.apache.hadoop.hbase.mapreduce.TableInputFormat
import org.apache.hadoop.hbase.mapreduce.TableOutputFormat
import org.apache.spark._

import org.apache.spark.rdd.NewHadoopRDD

object Main {

  def main(args: Array[String]) {
    val sc = new SparkContext(new SparkConf())

    val conf = HBaseConfiguration.create()

    conf.set(HConstants.ZOOKEEPER_QUORUM, "my.server")
    //config.set("hbase.zookeeper.property.clientPort","2181");
    val explicitNamespace: String = "BankData"
    val qualifiedTableName: String = explicitNamespace + ':' + "bank"

    conf.set(TableInputFormat.INPUT_TABLE, qualifiedTableName)
    conf.set(TableOutputFormat.OUTPUT_TABLE, qualifiedTableName)
    conf.set(TableInputFormat.INPUT_TABLE, "tmp")

    var hBaseRDD = sc.newAPIHadoopRDD(conf, classOf[TableInputFormat], classOf[org.apache.hadoop.hbase.io.ImmutableBytesWritable], classOf[org.apache.hadoop.hbase.client.Result])

  }

}&lt;/PRE&gt;&lt;P&gt;I run this with:&lt;/P&gt;&lt;PRE&gt;spark-submit --conf "spark.driver.userClassPathFirst=true" --conf "spark.executor.userClassPathFirst=true" --class Main --master yarn-cluster test2.jar &lt;/PRE&gt;&lt;P&gt;I got the following exception:&lt;/P&gt;&lt;PRE&gt;15/09/22 14:34:28 ERROR yarn.ApplicationMaster: User class threw exception: org.xerial.snappy.SnappyNative.maxCompressedLength(I)I
java.lang.UnsatisfiedLinkError: org.xerial.snappy.SnappyNative.maxCompressedLength(I)I
	at org.xerial.snappy.SnappyNative.maxCompressedLength(Native Method)
	at org.xerial.snappy.Snappy.maxCompressedLength(Snappy.java:316)
	at org.xerial.snappy.SnappyOutputStream.&amp;lt;init&amp;gt;(SnappyOutputStream.java:79)
	at org.apache.spark.io.SnappyCompressionCodec.compressedOutputStream(CompressionCodec.scala:157)
	at org.apache.spark.broadcast.TorrentBroadcast$$anonfun$4.apply(TorrentBroadcast.scala:199)
	at org.apache.spark.broadcast.TorrentBroadcast$$anonfun$4.apply(TorrentBroadcast.scala:199)
	at scala.Option.map(Option.scala:145)
	at org.apache.spark.broadcast.TorrentBroadcast$.blockifyObject(TorrentBroadcast.scala:199)
	at org.apache.spark.broadcast.TorrentBroadcast.writeBlocks(TorrentBroadcast.scala:101)
	at org.apache.spark.broadcast.TorrentBroadcast.&amp;lt;init&amp;gt;(TorrentBroadcast.scala:84)
	at org.apache.spark.broadcast.TorrentBroadcastFactory.newBroadcast(TorrentBroadcastFactory.scala:34)
	at org.apache.spark.broadcast.TorrentBroadcastFactory.newBroadcast(TorrentBroadcastFactory.scala:29)
	at org.apache.spark.broadcast.BroadcastManager.newBroadcast(BroadcastManager.scala:62)
	at org.apache.spark.SparkContext.broadcast(SparkContext.scala:1051)
	at org.apache.spark.rdd.NewHadoopRDD.&amp;lt;init&amp;gt;(NewHadoopRDD.scala:77)
	at org.apache.spark.SparkContext.newAPIHadoopRDD(SparkContext.scala:878)
	at Main$.main(Main.scala:29)
	at Main.main(Main.scala)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:497)
	at org.apache.spark.deploy.yarn.ApplicationMaster$$anon$2.run(ApplicationMaster.scala:480)&lt;/PRE&gt;&lt;P&gt;I'm running CDH 5.4.3&lt;/P&gt;</description>
      <pubDate>Tue, 22 Sep 2015 12:38:09 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Override-libraries-for-spark/m-p/32140#M7395</guid>
      <dc:creator>martins</dc:creator>
      <dc:date>2015-09-22T12:38:09Z</dc:date>
    </item>
    <item>
      <title>Re: Override libraries for spark</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Override-libraries-for-spark/m-p/32143#M7396</link>
      <description>Hm, but have you modified classpath.txt? IIRC the last time I saw this&lt;BR /&gt;it was some strange problem with the snappy from HBase and one used by&lt;BR /&gt;other things like Spark. Does it work without the userClassPathFirst&lt;BR /&gt;arg? Just trying to narrow it down. This is always a problem&lt;BR /&gt;territory, turning on this flag, but that's a simple example with no&lt;BR /&gt;obvious reason it shouldn't work.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 22 Sep 2015 12:49:55 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Override-libraries-for-spark/m-p/32143#M7396</guid>
      <dc:creator>srowen</dc:creator>
      <dc:date>2015-09-22T12:49:55Z</dc:date>
    </item>
    <item>
      <title>Re: Override libraries for spark</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Override-libraries-for-spark/m-p/32144#M7397</link>
      <description>&lt;P&gt;I did not modify classpath.txt since I don't want to touch files generated by cloudera.&lt;/P&gt;&lt;P&gt;Without the&amp;nbsp;userClassPathFirst switch, it works correctly. Unfortunately, I need the switch to replace a few other libraries that are already in the classpath.txt.&lt;/P&gt;</description>
      <pubDate>Tue, 22 Sep 2015 12:54:15 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Override-libraries-for-spark/m-p/32144#M7397</guid>
      <dc:creator>martins</dc:creator>
      <dc:date>2015-09-22T12:54:15Z</dc:date>
    </item>
    <item>
      <title>Re: Override libraries for spark</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Override-libraries-for-spark/m-p/32146#M7398</link>
      <description>I remember some problems with snappy and HBase like this, like somehow&lt;BR /&gt;an older version used by HBase ended up taking precedence in the app&lt;BR /&gt;classloader and then it could not quite load properly, as it couldn't&lt;BR /&gt;see the shared library in the parent classloader. This may be a&lt;BR /&gt;manifestation of that one. I know there are certainly cases where&lt;BR /&gt;there is no resolution to the conflict, since an app and Spark may use&lt;BR /&gt;mutually incompatible versions of a dependency, and one will mess with&lt;BR /&gt;the other if the Spark and app classloader are connected, no matter&lt;BR /&gt;what their ordering.&lt;BR /&gt;&lt;BR /&gt;For this toy example, you'd just not set the classpath setting since&lt;BR /&gt;it isn't needed. For your app, if neither combination works, then your&lt;BR /&gt;options are probably to harmonize library versions with Spark, or&lt;BR /&gt;shade your copy of the library.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 22 Sep 2015 13:06:55 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Override-libraries-for-spark/m-p/32146#M7398</guid>
      <dc:creator>srowen</dc:creator>
      <dc:date>2015-09-22T13:06:55Z</dc:date>
    </item>
    <item>
      <title>Re: Override libraries for spark</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Override-libraries-for-spark/m-p/39191#M7399</link>
      <description>&lt;P&gt;I ran into the same problem. Without the "spark.executor.userClassPathFirst" set to true, I have a problem with joda-time library. Spark uses an older version of joda-time (classpath.txt shows version as&amp;nbsp;2.1) whereas application needs 2.8.1 or higher...&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;With the "spark.executor.userClassPathFirst" set to true (and joda-time-2.8.1 provided with --jars option), I run into snappy-java version problems leading to&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;java.lang.UnsatisfiedLinkError: org.xerial.snappy.SnappyNative.uncompressedLength(Ljava/lang/Object;II)I
	at org.xerial.snappy.SnappyNative.uncompressedLength(Native Method)
	at org.xerial.snappy.Snappy.uncompressedLength(Snappy.java:541)
	at org.xerial.snappy.SnappyInputStream.hasNextChunk(SnappyInputStream.java:350)
	at org.xerial.snappy.SnappyInputStream.rawRead(SnappyInputStream.java:158)
	at org.xerial.snappy.SnappyInputStream.read(SnappyInputStream.java:142)
	at com.esotericsoftware.kryo.io.Input.fill(Input.java:140)
	at com.esotericsoftware.kryo.io.Input.require(Input.java:155)
	at com.esotericsoftware.kryo.io.Input.readInt(Input.java:337)
	at com.esotericsoftware.kryo.util.DefaultClassResolver.readClass(DefaultClassResolver.java:109)
	at com.esotericsoftware.kryo.Kryo.readClass(Kryo.java:610)
	at com.esotericsoftware.kryo.Kryo.readClassAndObject(Kryo.java:721)
	at org.apache.spark.serializer.KryoDeserializationStream.readObject(KryoSerializer.scala:192)
	at org.apache.spark.broadcast.TorrentBroadcast$.unBlockifyObject(TorrentBroadcast.scala:217)
	at org.apache.spark.broadcast.TorrentBroadcast$$anonfun$readBroadcastBlock$1.apply(TorrentBroadcast.scala:178)
	at org.apache.spark.util.Utils$.tryOrIOException(Utils.scala:1174)
	at org.apache.spark.broadcast.TorrentBroadcast.readBroadcastBlock(TorrentBroadcast.scala:165)
	at org.apache.spark.broadcast.TorrentBroadcast._value$lzycompute(TorrentBroadcast.scala:64)
	at org.apache.spark.broadcast.TorrentBroadcast._value(TorrentBroadcast.scala:64)
	at org.apache.spark.broadcast.TorrentBroadcast.getValue(TorrentBroadcast.scala:88)
	at org.apache.spark.broadcast.Broadcast.value(Broadcast.scala:70)
	at org.apache.spark.scheduler.ResultTask.runTask(ResultTask.scala:62)
	at org.apache.spark.scheduler.Task.run(Task.scala:88)
	at org.apache.spark.executor.Executor$TaskRunner.run(Executor.scala:214)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at java.lang.Thread.run(Thread.java:745)&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there a way to know which version of snappy-java is being picked up and from which location?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 30 Mar 2016 21:04:28 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Override-libraries-for-spark/m-p/39191#M7399</guid>
      <dc:creator>PrasanthM</dc:creator>
      <dc:date>2016-03-30T21:04:28Z</dc:date>
    </item>
    <item>
      <title>Re: Override libraries for spark</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Override-libraries-for-spark/m-p/39192#M7400</link>
      <description>&lt;P&gt;I did try with a fat-jar (shade plugin) and include joda-time-2.9.jar, but the classes are still picked up from spark-assembly..!&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I had the following line of code -&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;logger.info("DateTime classes version = " + new DateTime().getClass().getProtectionDomain().getCodeSource());&lt;/PRE&gt;&lt;P&gt;which still logs it as&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;DateTime classes version = (file:/opt/cloudera/parcels/CDH-5.5.2-1.cdh5.5.2.p1310.1096/jars/spark-assembly-1.5.0-cdh5.5.2-hadoop2.6.0-cdh5.5.2.jar&lt;/PRE&gt;&lt;P&gt;Maven shade plugin -&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&amp;lt;plugin&amp;gt;
        &amp;lt;groupId&amp;gt;org.apache.maven.plugins&amp;lt;/groupId&amp;gt;
        &amp;lt;artifactId&amp;gt;maven-shade-plugin&amp;lt;/artifactId&amp;gt;
        &amp;lt;version&amp;gt;2.4.3&amp;lt;/version&amp;gt;
        &amp;lt;configuration/&amp;gt;
        &amp;lt;executions&amp;gt;
          &amp;lt;execution&amp;gt;
            &amp;lt;phase&amp;gt;package&amp;lt;/phase&amp;gt;
            &amp;lt;goals&amp;gt;
              &amp;lt;goal&amp;gt;shade&amp;lt;/goal&amp;gt;
            &amp;lt;/goals&amp;gt;
          &amp;lt;/execution&amp;gt;
        &amp;lt;/executions&amp;gt;
      &amp;lt;/plugin&amp;gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So, what option do I try?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 30 Mar 2016 22:12:42 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Override-libraries-for-spark/m-p/39192#M7400</guid>
      <dc:creator>PrasanthM</dc:creator>
      <dc:date>2016-03-30T22:12:42Z</dc:date>
    </item>
    <item>
      <title>Re: Override libraries for spark</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Override-libraries-for-spark/m-p/48110#M7401</link>
      <description>&lt;P&gt;we had an similiar problem running Accumulo 1.7.2 (parcel based) on CDH5. Unfortunately CDH5 bundles Accumul 1.6.0 jars by default.&lt;BR /&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Our workaround was to modify &lt;STRONG&gt;SPARK_DIST_CLASSPATH&lt;/STRONG&gt; via&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;Spark Service Advanced Configuration Snippet (Safety Valve) for spark-conf/spark-env.sh – Spark (Service-Wide)&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;PRE&gt;SPARK_DIST_CLASSPATH=/opt/cloudera/parcels/ACCUMULO/lib/accumulo/lib/accumulo-core.jar:$SPARK_DIST_CLASSPATH
SPARK_DIST_CLASSPATH=/opt/cloudera/parcels/ACCUMULO/lib/accumulo/lib/accumulo-fate.jar:$SPARK_DIST_CLASSPATH
SPARK_DIST_CLASSPATH=/opt/cloudera/parcels/ACCUMULO/lib/accumulo/lib/accumulo-start.jar:$SPARK_DIST_CLASSPATH
SPARK_DIST_CLASSPATH=/opt/cloudera/parcels/ACCUMULO/lib/accumulo/lib/accumulo-trace.jar:$SPARK_DIST_CLASSPATH
export SPARK_DIST_CLASSPATH&lt;/PRE&gt;
&lt;P&gt;This way you can add or redefine SPARK_DIST_CLASSPATH&lt;/P&gt;</description>
      <pubDate>Tue, 29 Nov 2016 13:46:17 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Override-libraries-for-spark/m-p/48110#M7401</guid>
      <dc:creator>thomeme</dc:creator>
      <dc:date>2016-11-29T13:46:17Z</dc:date>
    </item>
  </channel>
</rss>

