Ngone51 commented on a change in pull request #24841: [SPARK-27369][CORE] Setup resources when Standalone Worker starts up URL: https://github.com/apache/spark/pull/24841#discussion_r292767399
########## File path: core/src/main/scala/org/apache/spark/deploy/worker/Worker.scala ########## @@ -220,6 +225,38 @@ private[deploy] class Worker( metricsSystem.getServletHandlers.foreach(webUi.attachHandler) } + // TODO if we're starting up multi workers under the same host, discovery script won't work. + private def setupWorkerResources(): Unit = { + try { + resources = resourceFile.map { rFile => + ResourceDiscoverer.parseAllocatedFromJsonFile(rFile) + }.getOrElse { + if (resourceDiscoveryScript.isEmpty) { Review comment: Not sure what you actually mean here. Just explain my understanding. `resourceDiscoveryScript` is configured from `SPARK_WORKER_RESOURCE_DISCOVERY_SCRIPT` or `--resource-script`, which are specially for Worker. And, application(driver/executor) discoveryScipt config haven't setup while Worker is starting up. ---------------------------------------------------------------- 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: us...@infra.apache.org With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org