-
- Downloads
SPARK-571: forbid return statements in cleaned closures
This patch checks top-level closure arguments to `ClosureCleaner.clean` for `return` statements and raises an exception if it finds any. This is mainly a user-friendliness addition, since programs with return statements in closure arguments will currently fail upon RDD actions with a less-than-intuitive error message. Author: William Benton <willb@redhat.com> Closes #717 from willb/spark-571 and squashes the following commits: c41eb7d [William Benton] Another test case for SPARK-571 30c42f4 [William Benton] Stylistic cleanups 559b16b [William Benton] Stylistic cleanups from review de13b79 [William Benton] Style fixes 295b6a5 [William Benton] Forbid return statements in closure arguments. b017c47 [William Benton] Added a test for SPARK-571
Showing
- core/src/main/scala/org/apache/spark/util/ClosureCleaner.scala 22 additions, 1 deletion...src/main/scala/org/apache/spark/util/ClosureCleaner.scala
- core/src/test/scala/org/apache/spark/util/ClosureCleanerSuite.scala 38 additions, 1 deletion...est/scala/org/apache/spark/util/ClosureCleanerSuite.scala
Loading
Please register or sign in to comment