Ngone51 commented on a change in pull request #25047: [WIP][SPARK-27371][CORE]
Support GPU-aware resources scheduling in Standalone
URL: https://github.com/apache/spark/pull/25047#discussion_r300237828
##########
File path: core/src/main/scala/org/apache/spark/SparkContext.scala
##########
@@ -380,6 +380,17 @@ class SparkContext(config: SparkConf) extends Logging {
val resourcesFileOpt = conf.get(DRIVER_RESOURCES_FILE)
_resources = getOrDiscoverAllResources(_conf, SPARK_DRIVER_PREFIX,
resourcesFileOpt)
+ // driver submitted in client mode under Standalone may have conflict
resources with
+ // workers on this host. We should sync driver's resources info into
SPARK_RESOURCES
+ // to avoid collision.
+ if (deployMode == "client" && (master.startsWith("spark://")
+ || master.startsWith("local-cluster"))) {
+ val requests = parseAllResourceRequests(_conf, SPARK_DRIVER_PREFIX).map
{req =>
+ req.id.resourceName -> req.amount
+ }.toMap
+ // TODO(wuyi) log driver's acquired resources separately ?
Review comment:
@dongjoon-hyun Thank you for reminding that. I'll fix those TODOs in
following commits.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]