Skip to content

Commit 82ca5f6

Browse files
committed
Revert hack
1 parent 096e6a9 commit 82ca5f6

File tree

2 files changed

+2
-24
lines changed

2 files changed

+2
-24
lines changed

repl/scala-2.11/src/main/scala/org/apache/spark/repl/SparkILoop.scala

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -87,22 +87,6 @@ class SparkILoop(in0: Option[BufferedReader], out: JPrintWriter)
8787

8888
/** Print a welcome message */
8989
override def printWelcome() {
90-
// Before Scala 2.11.9, `printWelcome()` will be called after Scala REPL and Spark
91-
// are initialized, so we will not call `initializeSynchronous()` in `printWelcome()`.
92-
//
93-
// However, after Scala 2.11.9, `printWelcome()` will be the first thing to be called,
94-
// so we initialize the Scala REPL and Spark here instead.
95-
if (intp == null) {
96-
createInterpreter()
97-
}
98-
echo(s"DB printWelcome 1 ${intp.isInitializeComplete}" )
99-
100-
if (!intp.isInitializeComplete) {
101-
intp.initializeSynchronous()
102-
}
103-
104-
echo(s"DB printWelcome 2 ${intp.isInitializeComplete}" )
105-
10690
import org.apache.spark.SPARK_VERSION
10791
echo("""Welcome to
10892
____ __

repl/scala-2.11/src/main/scala/org/apache/spark/repl/SparkILoopInterpreter.scala

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -34,14 +34,8 @@ class SparkILoopInterpreter(settings: Settings, out: JPrintWriter, initializeSpa
3434
* See the discussion in Scala community https://github.com/scala/bug/issues/10913 for detail.
3535
*/
3636
override def initializeSynchronous(): Unit = {
37-
// scalastyle:off println
38-
println(s"DB initializeSynchronous ${isInitializeComplete}" )
39-
// scalastyle:on println
40-
41-
if (!isInitializeComplete) {
42-
super.initializeSynchronous()
43-
initializeSpark()
44-
}
37+
super.initializeSynchronous()
38+
initializeSpark()
4539
}
4640

4741
override lazy val memberHandlers = new {

0 commit comments

Comments
 (0)