Uh oh!
There was an error while loading. Please reload this page.
[SPARK-20816][CORE] MetricsConfig doen't trim the properties file cau… - #18041
[SPARK-20816][CORE] MetricsConfig doen't trim the properties file cau…#18041LantaoJin wants to merge 1 commit into
Conversation
…se the exception very confused
AmplabJenkins
commented
May 20, 2017
Can one of the admins verify this patch? |
srowen
commented
May 20, 2017
Why do you think this relates to trimming whitespace? |
LantaoJin
commented
May 20, 2017
@srowen It's not a real normal class not found case. And I do know what happened here. What I point out is a case that a whitespace at the end of the class name will cause ClassNotFound exception. This case is very confused to user. If it can be trimmed before reflection, that's much good I think. |
jerryshao
commented
May 25, 2017
@LantaoJin I don't think you have to do trim for metrics conf coming from
For metrics conf reading from metrics property file, I think we could trim the trailing whitespace when reading from property file. |
srowen
commented
May 30, 2017
Let's close this |
jerryshao
commented
May 31, 2017
@srowen , this issue existed when reading from metrics.properties conf file, I think we should fix this part. As for SparkConf part, I don't think it is necessary to fix. |
# What changes were proposed in this pull request? This PR proposes to close stale PRs, mostly the same instances with apache#18017Closesapache#11459Closesapache#13833Closesapache#13720Closesapache#12506Closesapache#12456Closesapache#12252Closesapache#17689Closesapache#17791Closesapache#18163Closesapache#17640Closesapache#17926Closesapache#18163Closesapache#12506Closesapache#18044Closesapache#14036Closesapache#15831Closesapache#14461Closesapache#17638Closesapache#18222 Added: Closesapache#18045Closesapache#18061Closesapache#18010Closesapache#18041Closesapache#18124Closesapache#18130Closesapache#12217 Added: Closesapache#16291Closesapache#17480Closesapache#14995 Added: Closesapache#12835Closesapache#17141 ## How was this patch tested? N/A Author: hyukjinkwon <gurwls223@gmail.com> Closesapache#18223 from HyukjinKwon/close-stale-prs.
…se the exception very confused
What changes were proposed in this pull request?
Spark Metrics System use a Properties File to load the configurations but doesn't trim the keys and values. It might cause the exception very confused if the property is a class name.
For example below, you must do not notice there is a space at the line end.
Unfortunately, the ClassNotFoundException throwing from Driver also doesn't tell me what happens and confuses me because I am sure the related jar is in the CLASSPATH.
As a reference, I check the code of Log4j, a classic Properties using library. It do the trim when load the properties. See org.apache.log4j.filter.PropertyFilter.java
How was this patch tested?
Add unit tests
Also can test manually by setting metrics.properties file
(Replace "_" with " ")