-
Notifications
You must be signed in to change notification settings - Fork 385
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
Fix PR926 local properties issues in Spark Streaming like scenarios #937
Conversation
|
||
threads.foreach(_.start()) | ||
assert(sc.getLocalProperty("test") === "parent") | ||
assert(sc.getLocalProperty("Foo") === null) |
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.
Don't we need a barrier here to properly test this?
Thanks for fixing this -- sorry for not realizing this use case! The fix looks good. |
Hi @rxin ,thanks for your reviewing. I think it's more reasonable to add a barrier to unit test, I've already update the patch. |
Jenkins, test this please. |
Merged build triggered. |
Merged build started. |
Merged build finished. |
One or more automated tests failed |
Jenkins, retest this please. |
Merged build triggered. |
Merged build started. |
Merged build finished. |
All automated tests passed. |
Fix PR926 local properties issues in Spark Streaming like scenarios
We should also merge this back into 0.8 branch once 0.8 is released. |
I've merged this into asf spark branch-0.8. |
Fix PR926 local properties issues in Spark Streaming like scenarios (cherry picked from commit a2ea069) Signed-off-by: Reynold Xin <rxin@apache.org>
PR926 changes local properties from
DynamicVariable
toThreadLocal
, which cannot pass properties set in parent thread to child thread. Scenarios like Spark Streaming which separaterunJob()
function in child thread will always getnull
properties and pass to DAGScheduler. So thread local properties should be inheritable, also should be isolated in different threads.