aboutsummaryrefslogtreecommitdiff
path: root/repl/scala-2.10
diff options
context:
space:
mode:
authorMarcelo Vanzin <vanzin@cloudera.com>2016-03-14 14:27:33 -0700
committerMarcelo Vanzin <vanzin@cloudera.com>2016-03-14 14:27:33 -0700
commit8301fadd8d269da11e72870b7a889596e3337839 (patch)
tree74c42c6c99d0438f3669acdae8982f3632259254 /repl/scala-2.10
parent38529d8f2350feb1f143aab0be336050c0f887f2 (diff)
downloadspark-8301fadd8d269da11e72870b7a889596e3337839.tar.gz
spark-8301fadd8d269da11e72870b7a889596e3337839.tar.bz2
spark-8301fadd8d269da11e72870b7a889596e3337839.zip
[SPARK-13626][CORE] Avoid duplicate config deprecation warnings.
Three different things were needed to get rid of spurious warnings: - silence deprecation warnings when cloning configuration - change the way SparkHadoopUtil instantiates SparkConf to silence warnings - avoid creating new SparkConf instances where it's not needed. On top of that, I changed the way that Logging.scala detects the repl; now it uses a method that is overridden in the repl's Main class, and the hack in Utils.scala is not needed anymore. This makes the 2.11 repl behave like the 2.10 one and set the default log level to WARN, which is a lot better. Previously, this wasn't working because the 2.11 repl triggers log initialization earlier than the 2.10 one. I also removed and simplified some other code in the 2.11 repl's Main to avoid replicating logic that already exists elsewhere in Spark. Tested the 2.11 repl in local and yarn modes. Author: Marcelo Vanzin <vanzin@cloudera.com> Closes #11510 from vanzin/SPARK-13626.
Diffstat (limited to 'repl/scala-2.10')
-rw-r--r--repl/scala-2.10/src/main/scala/org/apache/spark/repl/Main.scala7
1 files changed, 6 insertions, 1 deletions
diff --git a/repl/scala-2.10/src/main/scala/org/apache/spark/repl/Main.scala b/repl/scala-2.10/src/main/scala/org/apache/spark/repl/Main.scala
index 14b448d076..5fe5c86289 100644
--- a/repl/scala-2.10/src/main/scala/org/apache/spark/repl/Main.scala
+++ b/repl/scala-2.10/src/main/scala/org/apache/spark/repl/Main.scala
@@ -19,7 +19,12 @@ package org.apache.spark.repl
import scala.collection.mutable.Set
-object Main {
+import org.apache.spark.Logging
+
+object Main extends Logging {
+
+ initializeLogIfNecessary(true)
+
private var _interp: SparkILoop = _
def interp = _interp