Github user srowen commented on a diff in the pull request:
https://github.com/apache/spark/pull/21930#discussion_r206968430
--- Diff: core/src/main/scala/org/apache/spark/util/ClosureCleaner.scala ---
@@ -159,6 +160,43 @@ private[spark] object ClosureCleaner extends Logging {
clean(closure, checkSerializable, cleanTransitively, Map.empty)
}
+ /**
+ * Try to get a serialized Lambda from the closure.
+ *
+ * @param closure the closure to check.
+ */
+ private def getSerializedLambda(closure: AnyRef):
Option[SerializedLambda] = {
+ if (scala.util.Properties.versionString.contains("2.11")) {
--- End diff --
Ah, this part of the diff was collapsed and I didn't see it. I have a few
more minor questions/suggestions on the closure cleaner change but would indeed
like to get this in for 2.4, and it looks close.
Here, what about storing the result of this in a private field so as not to
compute it every time? it might not be a big deal, don't know.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]