We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3998168 commit e909a42Copy full SHA for e909a42
core/src/main/scala/org/apache/spark/util/ClosureCleaner.scala
@@ -310,7 +310,9 @@ private[spark] object ClosureCleaner extends Logging {
310
311
private def ensureSerializable(func: AnyRef) {
312
try {
313
- SparkEnv.get.closureSerializer.newInstance().serialize(func)
+ if (SparkEnv.get != null) {
314
+ SparkEnv.get.closureSerializer.newInstance().serialize(func)
315
+ }
316
} catch {
317
case ex: Exception => throw new SparkException("Task not serializable", ex)
318
}
0 commit comments