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 9ac5f9b commit 8ac3074Copy full SHA for 8ac3074
core/src/main/scala/org/apache/spark/util/ClosureCleaner.scala
@@ -161,7 +161,9 @@ private[spark] object ClosureCleaner extends Logging {
161
162
private def ensureSerializable(func: AnyRef) {
163
try {
164
- SparkEnv.get.closureSerializer.newInstance().serialize(func)
+ if (SparkEnv.get != null) {
165
+ SparkEnv.get.closureSerializer.newInstance().serialize(func)
166
+ }
167
} catch {
168
case ex: Exception => throw new SparkException("Task not serializable", ex)
169
}
0 commit comments