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 e909a42 commit 6f75784Copy full SHA for 6f75784
core/src/main/scala/org/apache/spark/util/ClosureCleaner.scala
@@ -310,9 +310,7 @@ private[spark] object ClosureCleaner extends Logging {
310
311
private def ensureSerializable(func: AnyRef) {
312
try {
313
- if (SparkEnv.get != null) {
314
- SparkEnv.get.closureSerializer.newInstance().serialize(func)
315
- }
+ SparkEnv.get.closureSerializer.newInstance().serialize(func)
316
} catch {
317
case ex: Exception => throw new SparkException("Task not serializable", ex)
318
}
0 commit comments