Github user andrewor14 commented on a diff in the pull request:
https://github.com/apache/spark/pull/5685#discussion_r29074575
--- Diff: core/src/main/scala/org/apache/spark/util/ClosureCleaner.scala ---
@@ -167,15 +294,17 @@ private[spark] object ClosureCleaner extends Logging {
}
}
- private def instantiateClass(cls: Class[_], outer: AnyRef,
inInterpreter: Boolean): AnyRef = {
- // logInfo("Creating a " + cls + " with outer = " + outer)
+ private def instantiateClass(
+ cls: Class[_],
+ enclosingObject: AnyRef,
+ inInterpreter: Boolean): AnyRef = {
if (!inInterpreter) {
// This is a bona fide closure class, whose constructor has no
effects
// other than to set its fields, so use its constructor
val cons = cls.getConstructors()(0)
val params = cons.getParameterTypes.map(createNullValue).toArray
- if (outer != null) {
- params(0) = outer // First param is always outer object
+ if (enclosingObject!= null) {
--- End diff --
oops thanks
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]