-
Notifications
You must be signed in to change notification settings - Fork 28.6k
SPARK-5425: Use synchronised methods in system properties to create SparkConf #4221
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
SPARK-5425: Use synchronised methods in system properties to create SparkConf #4221
Conversation
Test build #26161 has started for PR 4221 at commit
|
Test build #26161 has finished for PR 4221 at commit
|
Test FAILed. |
Test build #26312 has started for PR 4221 at commit
|
Explanation of the second commit is in #4220 |
Test build #26312 has finished for PR 4221 at commit
|
Test PASSed. |
4a0c50d
to
01dd5cb
Compare
Test build #26321 has started for PR 4221 at commit
|
Test build #26321 has finished for PR 4221 at commit
|
Test PASSed. |
… system properties - explicit + defaults
Test build #26498 has started for PR 4221 at commit
|
Test build #26498 has finished for PR 4221 at commit
|
Test PASSed. |
Let's leave this PR open for a few days until we complete the 1.2.1 release voting, then I'll merge it into |
Jenkins, retest this please. |
Test build #27019 has started for PR 4221 at commit
|
I'm going to merge this into |
Test build #27019 has finished for PR 4221 at commit
|
Test PASSed. |
…parkConf SPARK-5425: Fixed usages of system properties This patch fixes few problems caused by the fact that the Scala wrapper over system properties is not thread-safe and is basically invalid because it doesn't take into account the default values which could have been set in the properties object. The problem is fixed by modifying `Utils.getSystemProperties` method so that it uses `stringPropertyNames` method of the `Properties` class, which is thread-safe (internally it creates a defensive copy in a synchronized method) and returns keys of the properties which were set explicitly and which are defined as defaults. The other related problem, which is fixed here. was in `ResetSystemProperties` mix-in. It created a copy of the system properties in the wrong way. This patch also introduces a test case for thread-safeness of SparkConf creation. Refer to the discussion in #4220 for more details. Author: Jacek Lewandowski <lewandowski.jacek@gmail.com> Closes #4221 from jacek-lewandowski/SPARK-5425-1.2 and squashes the following commits: 87951a2 [Jacek Lewandowski] SPARK-5425: Modified Utils.getSystemProperties to return a map of all system properties - explicit + defaults 01dd5cb [Jacek Lewandowski] SPARK-5425: Use SerializationUtils to save properties in ResetSystemProperties trait 94aeacf [Jacek Lewandowski] SPARK-5425: Use synchronised methods in system properties to create SparkConf
I've merged this into @jacek-lewandowski, you can close this PR now that it's been merged, since GitHub can't auto close. |
Mind closing this PR @jacek-lewandowski ? |
Yeah our auto-close doesn't work on PR's into release branches like this. |
SPARK-5425: Fixed usages of system properties
This patch fixes few problems caused by the fact that the Scala wrapper over system properties is not thread-safe and is basically invalid because it doesn't take into account the default values which could have been set in the properties object. The problem is fixed by modifying
Utils.getSystemProperties
method so that it usesstringPropertyNames
method of theProperties
class, which is thread-safe (internally it creates a defensive copy in a synchronized method) and returns keys of the properties which were set explicitly and which are defined as defaults.The other related problem, which is fixed here. was in
ResetSystemProperties
mix-in. It created a copy of the system properties in the wrong way.This patch also introduces a test case for thread-safeness of SparkConf creation.
Refer to the discussion in #4220 for more details.