Uh oh!
There was an error while loading. Please reload this page.
[SPARK-7945][CORE]Do trim to values in properties file - #6496
[SPARK-7945][CORE]Do trim to values in properties file#6496WangTaoTheTonic wants to merge 3 commits into
Conversation
srowen
commented
May 29, 2015
Yeah, the way This only affects one usage of |
WangTaoTheTonic
commented
May 29, 2015
What more confusion would this cause? And I cann't think of another solution to address this perfectly so did same as BTW the problem this causes really hurts us as whitespace behind some value is really hard to be detected. |
srowen
commented
May 29, 2015
You expect I suppose we can't use I suppose if |
SparkQA
commented
May 29, 2015
Test build #33732 has finished for PR 6496 at commit
|
WangTaoTheTonic
commented
May 29, 2015
vanzin
commented
May 29, 2015
Yeah, it's a theoretical problem, but to be consistent with the rest of the code, I guess it doesn't hurt. |
There was a problem hiding this comment.
This is way more complicated than it needs to be. Just do:
for (Map.Entry<Object, Object> e : props.entrySet()) {
e.setValue(e.getValue().toString().trim());
}
WangTaoTheTonic
commented
May 29, 2015
I'm at home now and commit this without compiling locally, hope it all be good. |
SparkQA
commented
May 29, 2015
Test build #33742 has finished for PR 6496 at commit
|
WangTaoTheTonic
commented
May 29, 2015
Jenkins, retest this please. |
SparkQA
commented
May 29, 2015
Test build #33745 has finished for PR 6496 at commit
|
WangTaoTheTonic
commented
May 30, 2015
I've done a test with current code, it worked out fine. |
srowen
commented
May 30, 2015
LGTM |
https://issues.apache.org/jira/browse/SPARK-7945 Now applications submited by org.apache.spark.launcher.Main read properties file without doing trim to values in it. If user left a space after a value(say spark.driver.extraClassPath) then it probably affect global functions(like some jar could not be included in the classpath), so we should do it like Utils.getPropertiesFromFile. Author: WangTaoTheTonic <wangtao111@huawei.com> Author: Tao Wang <wangtao111@huawei.com> Closesapache#6496 from WangTaoTheTonic/SPARK-7945 and squashes the following commits: bb41b4b [Tao Wang] indent 4 to 2 6dd1cf2 [WangTaoTheTonic] use a simpler way 2c053a1 [WangTaoTheTonic] Do trim to values in properties file
https://issues.apache.org/jira/browse/SPARK-7945 Now applications submited by org.apache.spark.launcher.Main read properties file without doing trim to values in it. If user left a space after a value(say spark.driver.extraClassPath) then it probably affect global functions(like some jar could not be included in the classpath), so we should do it like Utils.getPropertiesFromFile. Author: WangTaoTheTonic <wangtao111@huawei.com> Author: Tao Wang <wangtao111@huawei.com> Closesapache#6496 from WangTaoTheTonic/SPARK-7945 and squashes the following commits: bb41b4b [Tao Wang] indent 4 to 2 6dd1cf2 [WangTaoTheTonic] use a simpler way 2c053a1 [WangTaoTheTonic] Do trim to values in properties file
https://issues.apache.org/jira/browse/SPARK-7945
Now applications submited by org.apache.spark.launcher.Main read properties file without doing trim to values in it.
If user left a space after a value(say spark.driver.extraClassPath) then it probably affect global functions(like some jar could not be included in the classpath), so we should do it like Utils.getPropertiesFromFile.