[GitHub] spark pull request #23189: [SPARK-26235][Core] Change log level for ClassNot...

2018-12-03 Thread asfgit
Github user asfgit closed the pull request at:

https://github.com/apache/spark/pull/23189


---

-
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org



[GitHub] spark pull request #23189: [SPARK-26235][Core] Change log level for ClassNot...

2018-11-30 Thread gengliangwang
Github user gengliangwang commented on a diff in the pull request:

https://github.com/apache/spark/pull/23189#discussion_r237972852
  
--- Diff: core/src/main/scala/org/apache/spark/deploy/SparkSubmit.scala ---
@@ -813,14 +813,14 @@ private[spark] class SparkSubmit extends Logging {
   mainClass = Utils.classForName(childMainClass)
 } catch {
   case e: ClassNotFoundException =>
-logWarning(s"Failed to load $childMainClass.", e)
+logError(s"Failed to load class $childMainClass.")
--- End diff --

Here I tried append `e.getMessage` to the output, but it seems the error 
message equals  the class name `childMainClass`. e.g.
```
Error: Failed to load class foo: foo.
```
So I think we can output without the exception message.


---

-
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org



[GitHub] spark pull request #23189: [SPARK-26235][Core] Change log level for ClassNot...

2018-11-30 Thread gengliangwang
GitHub user gengliangwang opened a pull request:

https://github.com/apache/spark/pull/23189

[SPARK-26235][Core] Change log level for 
ClassNotFoundException/NoClassDefFoundError in SparkSubmit to Error

## What changes were proposed in this pull request?

In my local setup, I set log4j root category as ERROR 
(https://stackoverflow.com/questions/27781187/how-to-stop-info-messages-displaying-on-spark-console
 , first item show up if we google search "set spark log level".) When I run 
such command 
``` 
spark-submit --class foo bar.jar 
``` 
Nothing shows up, and the script exits.  

After quick investigation, I think the log level for 
ClassNotFoundException/NoClassDefFoundError in SparkSubmit should be ERROR 
instead of WARN. Since the whole process exit because of the exception/error.

Before https://github.com/apache/spark/pull/20925, the message is not 
controlled by `log4j.rootCategory`. 

## How was this patch tested?

Manual check.


You can merge this pull request into a Git repository by running:

$ git pull https://github.com/gengliangwang/spark changeLogLevel

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/spark/pull/23189.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #23189


commit 158d421757989740345be4e52fbc333b08356b5b
Author: Gengliang Wang 
Date:   2018-11-30T14:23:44Z

change log level




---

-
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org