shardulm94 commented on a change in pull request #31591:
URL: https://github.com/apache/spark/pull/31591#discussion_r581277755



##########
File path: core/src/main/scala/org/apache/spark/deploy/SparkSubmit.scala
##########
@@ -1278,11 +1287,22 @@ private[spark] object SparkSubmitUtils {
       remoteRepos: Option[String],
       ivyPath: Option[String]): IvySettings = {
     val file = new File(settingsFile)
-    require(file.exists(), s"Ivy settings file $file does not exist")
-    require(file.isFile(), s"Ivy settings file $file is not a normal file")
+    // When running driver in cluster mode, the settingsFile is localized and 
so needs to be
+    // accessed using just the file name and not the full file path
+    val localizedFile = new File(file.getName)
+    val resolvedFile = if (file.exists()) {
+      Some(file)
+    } else if (localizedFile.exists()) {

Review comment:
       Yeah, agreed. I have elaborated on the difficulty to implement this 
cleanly in https://github.com/apache/spark/pull/31591#issuecomment-783969152 




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



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

Reply via email to