Github user preeze commented on a diff in the pull request:
https://github.com/apache/spark/pull/5835#discussion_r29495750
--- Diff: core/src/main/scala/org/apache/spark/util/ClosureCleaner.scala ---
@@ -169,7 +160,7 @@ private[spark] object ClosureCleaner extends Logging {
private def instantiateClass(cls: Class[_], outer: AnyRef,
inInterpreter: Boolean): AnyRef = {
// logInfo("Creating a " + cls + " with outer = " + outer)
- if (!inInterpreter) {
+ if (inInterpreter) {
--- End diff --
Not exactly.
This is why a put a note in the description asking for extra attention.
Previous behavior in case of a `ClassNotFoundException` was to follow the
same path as when the presence of the interpreter was successfully confirmed.
This looked not logical to me and I decided to correct while it being at it.
Now, when the exception is raised in evaluation of `isInInterpreter`, the
code in `org.apache.spark.util.ClosureCleaner#instantiateClass` will follow the
same path as when `interpClass.getMethod("interp").invoke(null)` returned
`null` indicating presence of the REPL wasn't detected.
Hope, this clarifies my intention.
---
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]