mridulm commented on code in PR #42357:
URL: https://github.com/apache/spark/pull/42357#discussion_r1318069261


##########
resource-managers/yarn/src/main/scala/org/apache/spark/deploy/yarn/Client.scala:
##########
@@ -492,10 +492,8 @@ private[spark] class Client(
   private[yarn] def getPreloadedStatCache(
       fsLookup: URI => FileSystem = FileSystem.get(_, hadoopConf)): 
HashMap[URI, FileStatus] = {
     val statCache = HashMap[URI, FileStatus]()
-    val jars = sparkConf.get(SPARK_JARS)
-    val directoryToFiles = 
jars.map(directoriesToBePreloaded).getOrElse(HashMap.empty)
-
-    directoryToFiles.foreach { case (dir: URI, filesInDir: HashSet[String]) =>
+    val jars = sparkConf.get(JARS_TO_DISTRIBUTE)

Review Comment:
   (Editing comment:)
   
   I am not sure I understood the comment :-)
   `statCache` is used within `prepareLocalResources` - within that method, it 
is used in context of `SPARK_JARS` and `distribute` method - so why use it only 
for `JARS_TO_DISTRIBUTE` ?
   
   Or in other words, if it applies to both - why only `JARS_TO_DISTRIBUTE` and 
not to all relevant configs ? (`SPARK_JARS`, `JARS_TO_DISTRIBUTE`, 
`FILES_TO_DISTRIBUTE`, `ARCHIVES_TO_DISTRIBUTE`, `pySparkArchives`, `PY_FILES`)



##########
resource-managers/yarn/src/main/scala/org/apache/spark/deploy/yarn/Client.scala:
##########
@@ -492,10 +492,8 @@ private[spark] class Client(
   private[yarn] def getPreloadedStatCache(
       fsLookup: URI => FileSystem = FileSystem.get(_, hadoopConf)): 
HashMap[URI, FileStatus] = {
     val statCache = HashMap[URI, FileStatus]()
-    val jars = sparkConf.get(SPARK_JARS)
-    val directoryToFiles = 
jars.map(directoriesToBePreloaded).getOrElse(HashMap.empty)
-
-    directoryToFiles.foreach { case (dir: URI, filesInDir: HashSet[String]) =>
+    val jars = sparkConf.get(JARS_TO_DISTRIBUTE)

Review Comment:
   (Editing comment:)
   
   I am not sure I understood the comment :-)
   `statCache` is used within `prepareLocalResources` - within that method, it 
is used in context of `SPARK_JARS` and `distribute` method - so why use it only 
for `JARS_TO_DISTRIBUTE` ?
   
   Or in other words, if it applies to all seq's - why only 
`JARS_TO_DISTRIBUTE` and not to all relevant configs ? (`SPARK_JARS`, 
`JARS_TO_DISTRIBUTE`, `FILES_TO_DISTRIBUTE`, `ARCHIVES_TO_DISTRIBUTE`, 
`pySparkArchives`, `PY_FILES`)



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

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to