-
Notifications
You must be signed in to change notification settings - Fork 28.9k
[SPARK-7945][CORE]Do trim to values in properties file #6496
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Yeah, the way This only affects one usage of |
|
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. |
|
You expect I suppose we can't use I suppose if |
|
Test build #33732 has finished for PR 6496 at commit
|
|
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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());
}
|
I'm at home now and commit this without compiling locally, hope it all be good. |
|
Test build #33742 has finished for PR 6496 at commit
|
|
Jenkins, retest this please. |
|
Test build #33745 has finished for PR 6496 at commit
|
|
I've done a test with current code, it worked out fine. |
|
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 <[email protected]> Author: Tao Wang <[email protected]> Closes apache#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 <[email protected]> Author: Tao Wang <[email protected]> Closes apache#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.