GitHub user swkimme opened a pull request:
https://github.com/apache/spark/pull/5046
[SPARK-6299][CORE] ClassNotFoundException in standalone mode when running
groupByKey with class defined in REPL
```
case class ClassA(value: String)
val rdd = sc.parallelize(List(("k1", ClassA("v1")), ("k1", ClassA("v2")) ))
rdd.groupByKey.collect
```
This code used to be throw exception in spark-shell, because while
shuffling ```JavaSerializer```uses ```defaultClassLoader``` which was defined
like ```env.serializer.setDefaultClassLoader(urlClassLoader)```.
It should be ```env.serializer.setDefaultClassLoader(urlClassLoader)```,
like
```
override def run() {
val deserializeStartTime = System.currentTimeMillis()
Thread.currentThread.setContextClassLoader(replClassLoader)
```
in TaskRunner.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/swkimme/spark master
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/spark/pull/5046.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #5046
----
commit c1b1fc732c2295412c38319968a6d8e1d949ce3b
Author: Kevin (Sangwoo) Kim <[email protected]>
Date: 2015-03-16T13:31:42Z
use REPL class loader for executor's serializer
----
---
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 [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]