tgravescs 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_r292912943
########## 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) { + logWarning(s"Neither resourceFile nor resourceDiscoveryScript found for worker. " + Review comment: I'm not sure you want to warn here. If users just aren't configuring spark to use other resources there is no reason to warn. ---------------------------------------------------------------- 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