Github user manku-timma commented on the pull request:

    https://github.com/apache/spark/pull/322#issuecomment-39676303
  
    @pwendell: I tested your fix to SparkEnv.scala (after reverting my earlier 
change). It does not work. SparkEnv's loader turns out to be 
`sun.misc.Launcher$AppClassLoader@12360be0` and it fails with the following 
error.
    
    ```
    java.lang.ClassNotFoundException: org/apache/spark/io/LZFCompressionCodec
            at java.lang.Class.forName0(Native Method)
            at java.lang.Class.forName(Class.java:249)
            at 
org.apache.spark.io.CompressionCodec$.createCodec(CompressionCodec.scala:45)
            at 
org.apache.spark.io.CompressionCodec$.createCodec(CompressionCodec.scala:41)
            at 
org.apache.spark.broadcast.HttpBroadcast$.initialize(HttpBroadcast.scala:110)
            at 
org.apache.spark.broadcast.HttpBroadcastFactory.initialize(HttpBroadcast.scala:71)
            at 
org.apache.spark.broadcast.BroadcastManager.initialize(Broadcast.scala:82)
            at 
org.apache.spark.broadcast.BroadcastManager.<init>(Broadcast.scala:69)
            at org.apache.spark.SparkEnv$.create(SparkEnv.scala:195)
            at org.apache.spark.executor.Executor.<init>(Executor.scala:105)
            at 
org.apache.spark.executor.MesosExecutorBackend.registered(MesosExecutorBackend.scala:56)
    ```
    
    My patch to `SparkEnv.scala`:
    ```
    @@ -142,7 +142,10 @@ object SparkEnv extends Logging {
           conf.set("spark.driver.port",  boundPort.toString)
         }
    
    -    val classLoader = Thread.currentThread.getContextClassLoader
    +    val classLoader = Option(Thread.currentThread.getContextClassLoader)
    +      .getOrElse(getClass.getClassLoader)
    ```


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to