-
Notifications
You must be signed in to change notification settings - Fork 29.1k
[SPARK-26192][MESOS][2.4] Retrieve enableFetcherCache option from submission for driver URIs #24713
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
HyukjinKwon
left a comment
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.
What this PR targets? we don't add new confs in backports.
|
ok to test |
|
Hi, @mwlon . Hi, @HyukjinKwon . |
|
Test build #105815 has finished for PR 24713 at commit
|
|
Ur, wait. It seems that I confused at the commit history. I'll comment back here. |
|
The following is the full history.
|
| .createWithDefault("") | ||
|
|
||
| private[spark] val MAX_DRIVERS = | ||
| ConfigBuilder("spark.mesos.maxDrivers").intConf.createWithDefault(200) |
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 not a part of SPARK-26192.
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.
It's part of later additions for SPARK-26082 that SPARK-26192 built on in master. I think it's good practice to use these config objects rather than magic strings, and something we want to keep.
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.
Backporting the improvement is not allowed. @mwlon . In addition, it's not a good practice to disguise one PR(SPARK-26082) into another PR (SPARK-26192) silently.
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.
Although it's not crazy to backport small enhancements, I'd not backport this change. 3.0 changes most all of the configs to use ConfigBuilder, but I don't necessarily think we want to change just a few of them in 2.4, just out of general consistency.
| ConfigBuilder("spark.mesos.maxDrivers").intConf.createWithDefault(200) | ||
|
|
||
| private[spark] val RETAINED_DRIVERS = | ||
| ConfigBuilder("spark.mesos.retainedDrivers").intConf.createWithDefault(200) |
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.
ditto.
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.
ditto.
| private[spark] val CLUSTER_RETRY_WAIT_MAX_SECONDS = | ||
| ConfigBuilder("spark.mesos.cluster.retry.wait.max") | ||
| .intConf | ||
| .createWithDefault(60) // 1 minute |
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.
ditto.
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.
ditto.
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.
ditto.
| .doc("If set to true, all URIs (example: `spark.executor.uri`, `spark.mesos.uris`) will " + | ||
| "be cached by the Mesos Fetcher Cache.") | ||
| .booleanConf | ||
| .createWithDefault(false) |
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.
Let's not add this. What we need is just the functional logic of SPARK-26192.
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.
So use magic strings instead of config objects?
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.
Of course, that's the backport. You should not pull the master branch code blindly.
| val driverMemoryOverhead = sparkProperties.get(config.DRIVER_MEMORY_OVERHEAD.key) | ||
| val driverCores = sparkProperties.get("spark.driver.cores") | ||
| val name = request.sparkProperties.getOrElse("spark.app.name", mainClass) | ||
| val name = sparkProperties.getOrElse("spark.app.name", mainClass) |
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.
Please revert all the changes in this file.
| private val useFetchCache = conf.getBoolean("spark.mesos.fetcherCache.enable", false) | ||
| private val queuedCapacity = conf.get(config.MAX_DRIVERS) | ||
| private val retainedDrivers = conf.get(config.RETAINED_DRIVERS) | ||
| private val maxRetryWaitTime = conf.get(config.CLUSTER_RETRY_WAIT_MAX_SECONDS) |
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.
Please revert the above.
| } | ||
|
|
||
| private def getDriverUris(desc: MesosDriverDescription): List[CommandInfo.URI] = { | ||
| val useFetchCache = desc.conf.get(config.ENABLE_FETCHER_CACHE) |
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 completely wrong. The following is the Apache Spark patch.
val useFetchCache = desc.conf.get(config.ENABLE_FETCHER_CACHE) ||
conf.get(config.ENABLE_FETCHER_CACHE)
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.
My mistake - I missed a couple commits in my cherry-pick. Will fix.
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
dongjoon-hyun
left a comment
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.
@mwlon . I left a few comments. Could you address them?
|
@HyukjinKwon note that this doesn't add any new confs. It only adds existing confs to the relevant config object rather than using magic strings. |
|
That confs don't exist in
|
|
@dongjoon-hyun not sure what you mean - in 2.4 we have in MesosClusterScheduler. So the confs already exist. |
|
What I mean is |
|
Please follow the exiting way of |
|
Ok, if we don't want the other associated changes of SPARK-26192 and only the functional part, then close this PR and I'll make a new one later. |
|
Yep. Thanks. |
What changes were proposed in this pull request?
Retrieve enableFetcherCache option from submission conf rather than dispatcher conf. This resolves some confusing behavior where Spark drivers currently get this conf from the dispatcher, whereas Spark executors get this conf from the submission. After this change, the conf will only need to be specified once.
How was this patch tested?
With (updated) existing tests.