-
Notifications
You must be signed in to change notification settings - Fork 28.9k
[SPARK-3767] [CORE] Support wildcard in Spark properties #12753
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
|
Can one of the admins verify this patch? |
|
I think this is a good idea in general, but I'm less sure about @. Is @ used in windows? Any other places? |
|
Thanks @rxin for checking this, I don't think @ is used any where. Here again we are replacing only for 'spark.executor.extraJavaOptions' value when @execid@ occurs, any other @ symbols we leave as it is, so I don't think any problem occurs due to this. |
| Environment.Variable.newBuilder().setName("SPARK_CLASSPATH").setValue(cp).build()) | ||
| } | ||
| val extraJavaOpts = conf.get("spark.executor.extraJavaOptions", "") | ||
| var extraJavaOpts = conf.get("spark.executor.extraJavaOptions", "") |
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.
would it be a little cleaner to do the following
val extraJavaOpts = conf.getOption("spark.executor.extraJavaOptions").map {
Utils.substituteExecIdWildCard(_, taskId)
}.getOrElse("")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.
Thanks @BryanCutler for the suggestion, I have addressed it in the latest.
|
@rxin, Please have a look into this and let me know any thing needs to be done here. About @, M/R also uses @ for the taskid wild card in java opts and there is no problem in windows and as well as in other places with @. |
|
Sorry this has been forgotten for so long. I think instead of adding a new way of referencing variables, it might be better to use the new code I'm adding in #14468; that way it would be easier to reference executor id (by creating a new At the very least conflicts need to be resolved. |
|
@vanzin Thanks for looking into this, I have resolved the conflicts. |
|
Hmmm... wouldn't this be a one line change (for standalone and mesos) if instead you modified That would replace You'd still need some extra code for YARN since it doesn't use that path. But it would be a smaller change that re-uses existing functionality. EDIT: mesos seems to use a different path too. I just want to avoid creating yet another syntax for variable substitution. We should either use the standalone-style internal variable substitution ( |
|
Also the PR title is misleading, since this change is adding a single "wildcard" to a single configuration. The title makes it sound like it's way more generic than it is. |
|
Hi @devaraj-kavali, are you still interested in updating this PR? I really think it should use the features I added in SPARK-16671 (especially the |
|
@vanzin, SPARK-3767 was resolved as 'Won't Fix' by @srowen. I was in assumption that SPARK-16671 covers this as well. |
|
If you're willing to work on it you can re-open the bug. Otherwise you should close this PR. |
|
I will update this PR with the ConfigReader and reopen the jira. |
Closes apache#10995 Closes apache#13658 Closes apache#14505 Closes apache#14536 Closes apache#12753 Closes apache#14449 Closes apache#12694 Closes apache#12695 Closes apache#14810
What changes were proposed in this pull request?
Added provision to specify the 'spark.executor.extraJavaOptions' value in terms of the Executor Id(i.e. @execid@). @execid@ will be replaced with the Executor Id while starting the executor.
How was this patch tested?
I have verified this by checking the executor process command and gc logs. I verified the same in different deployement modes(Standalone, YARN, Mesos).