Skip to content

Commit

Permalink
Revert "Guard against NPE if CC is used outside of an application"
Browse files Browse the repository at this point in the history
This reverts commit e909a42.
  • Loading branch information
Andrew Or committed Apr 29, 2015
1 parent e909a42 commit 6f75784
Showing 1 changed file with 1 addition and 3 deletions.
Expand Up @@ -310,9 +310,7 @@ private[spark] object ClosureCleaner extends Logging {

private def ensureSerializable(func: AnyRef) {
try {
if (SparkEnv.get != null) {
SparkEnv.get.closureSerializer.newInstance().serialize(func)
}
SparkEnv.get.closureSerializer.newInstance().serialize(func)
} catch {
case ex: Exception => throw new SparkException("Task not serializable", ex)
}
Expand Down

0 comments on commit 6f75784

Please sign in to comment.