Github user preeze commented on a diff in the pull request:
https://github.com/apache/spark/pull/5835#discussion_r29546782
--- 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 --
I am afraid I may be still missing some clarity around detection of REPL
mode.
Can you please guys clarify.
On current master
(https://github.com/apache/spark/blob/master/core/src/main/scala/org/apache/spark/util/ClosureCleaner.scala#L237)
I read it as follows:
1. If class `scala.repl.Main` is not found, we are in the REPL mode.
2. If class `scala.repl.Main` is found then:
* If its `interp()` returned non-null, we are in the REPL mode.
* if its `interp()` returned null, we are in the non-REPL mode.
What I tend to disagree with is the first branch above.
Why would we behave the same way when the class wasn't found and when the
class was found and invoking `interp()` on that returned smth?
---
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]