-
Notifications
You must be signed in to change notification settings - Fork 28.5k
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-14686] Allow setting local properties that are not inheritable #12456
Conversation
I should add that this will also need new tests. I haven't added any, again pending overall agreement on design. |
Can you add a more descriptive title? |
The title should probably just be "[SPARK-14686] Allow setting local properties that are not inheritable" |
@rxin Derp on my part. Of course this needs a better title. |
Can one of the admins verify this patch? |
cc @jerryshao I just talked to @JoshRosen more and thinking whether we should make this always non-inheritable. Josh said Jerry might've added something in the past that relied on this. @jerryshao can you comment on whether it would be a problem if we make this always non-inheritable and always explicitly pass properties over in spawned threads? |
Hi @rxin , the reason to use inheritable variable is for some scenarios like Spark Streaming + FIFO scheduling, the property of pool is set in parent thread (main thread) and be picked in child thread (job thread). Basically if the creation of If there's other solution to solve this issue, I fully agree with the change to non-inheritable variables. |
Can you explain what you mean by that? Or link us to some code? It's totally possible that it is impossible, or that it's possible. |
For example, if you have a main thread to create a |
@jerryshao Makes sense. Would having an explicitly inheritable facility, or a way to switch the spark context into inheritable mode (whatever that design looks like - e.g. a subclass or facade object) meet the need? |
Hi @marcintustin and all, where are we on this? is this still active? |
I am not actively working on this.
--
Marcin Tustin
Tel: +1 917 553 3974
|
I just want to be sure. Is it waiting for reviewer's comment or you just happened to don't have some time to keep this up-to-date for now? If it is the latter case, I think we could leave this closed for now. We can reopen this whenever you have some time. |
Feel free to close
--
Marcin Tustin
Tel: +1 917 553 3974
|
What changes were proposed in this pull request?
This PR adds a uninheritableLocalPropertyFacility and ports sql.execution.id to be set with that facility.
If this is to go forward, the changes should probably be folded into a Properties type which accommodates hierarchical access rather than a tuple.
How was this patch tested?
Running tests.
@rxin @JoshRosen PR opened for comments. As noted above, this should probably have a little more engineering done, but I'd like to (a) get feedback on the overall approach; and (b) see which tests fail in jenkins, as I have some tests failing locally which may or may not be bogus.