You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spark.apache.org by sh...@apache.org on 2016/09/03 20:57:04 UTC

spark git commit: [SPARK-16829][SPARKR] sparkR sc.setLogLevel doesn't work

Repository: spark
Updated Branches:
  refs/heads/master abb2f9210 -> e9b58e9ef


[SPARK-16829][SPARKR] sparkR sc.setLogLevel doesn't work

(Please fill in changes proposed in this fix)

./bin/sparkR
Launching java with spark-submit command /Users/mwang/spark_ws_0904/bin/spark-submit "sparkr-shell" /var/folders/s_/83b0sgvj2kl2kwq4stvft_pm0000gn/T//RtmpQxJGiZ/backend_porte9474603ed1e
Using Spark's default log4j profile: org/apache/spark/log4j-defaults.properties
Setting default log level to "WARN".
To adjust logging level use sc.setLogLevel(newLevel).

> sc.setLogLevel("INFO")
Error: could not find function "sc.setLogLevel"

sc.setLogLevel doesn't exist.

R has a function setLogLevel.

I rename the setLogLevel function to sc.setLogLevel.

(Please explain how this patch was tested. E.g. unit tests, integration tests, manual tests)
Change unit test. Run unit tests.
Manually tested it in sparkR shell.

Author: wm624@hotmail.com <wm...@hotmail.com>

Closes #14433 from wangmiao1981/sc.


Project: http://git-wip-us.apache.org/repos/asf/spark/repo
Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/e9b58e9e
Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/e9b58e9e
Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/e9b58e9e

Branch: refs/heads/master
Commit: e9b58e9ef89a9118b6d5a466d10db8e30d61f850
Parents: abb2f92
Author: wm624@hotmail.com <wm...@hotmail.com>
Authored: Sat Sep 3 13:52:55 2016 -0700
Committer: Shivaram Venkataraman <sh...@cs.berkeley.edu>
Committed: Sat Sep 3 13:56:20 2016 -0700

----------------------------------------------------------------------
 core/src/main/scala/org/apache/spark/internal/Logging.scala | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/spark/blob/e9b58e9e/core/src/main/scala/org/apache/spark/internal/Logging.scala
----------------------------------------------------------------------
diff --git a/core/src/main/scala/org/apache/spark/internal/Logging.scala b/core/src/main/scala/org/apache/spark/internal/Logging.scala
index 66a0cfe..013cd1c 100644
--- a/core/src/main/scala/org/apache/spark/internal/Logging.scala
+++ b/core/src/main/scala/org/apache/spark/internal/Logging.scala
@@ -135,7 +135,8 @@ private[spark] trait Logging {
         val replLevel = Option(replLogger.getLevel()).getOrElse(Level.WARN)
         if (replLevel != rootLogger.getEffectiveLevel()) {
           System.err.printf("Setting default log level to \"%s\".\n", replLevel)
-          System.err.println("To adjust logging level use sc.setLogLevel(newLevel).")
+          System.err.println("To adjust logging level use sc.setLogLevel(newLevel). " +
+            "For SparkR, use setLogLevel(newLevel).")
           rootLogger.setLevel(replLevel)
         }
       }


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@spark.apache.org
For additional commands, e-mail: commits-help@spark.apache.org