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_r292920997
 
 

 ##########
 File path: 
core/src/main/scala/org/apache/spark/deploy/worker/WorkerArguments.scala
 ##########
 @@ -54,6 +56,12 @@ private[worker] class WorkerArguments(args: Array[String], 
conf: SparkConf) {
   if (System.getenv("SPARK_WORKER_DIR") != null) {
     workDir = System.getenv("SPARK_WORKER_DIR")
   }
+  if (System.getenv("SPARK_WORKER_RESOURCE_FILE") != null) {
+    resourceFile = Some(System.getenv("SPARK_WORKER_RESOURCE_FILE"))
+  }
+  if (System.getenv("SPARK_WORKER_RESOURCE_DISCOVERY_SCRIPT") != null) {
+    
parseResourceDiscoveryScript(conf.getenv("SPARK_WORKER_RESOURCE_DISCOVERY_SCRIPT"))
 
 Review comment:
   might be easier to read if we have parseResourceDiscoveryScript return a Map 
and set it here. 

----------------------------------------------------------------
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

Reply via email to