You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2019/12/06 10:48:24 UTC

[GitHub] [spark] cloud-fan commented on a change in pull request #26773: [SPARK-30126][CORE]sparkContext.addFile fails when file path contains…

cloud-fan commented on a change in pull request #26773: [SPARK-30126][CORE]sparkContext.addFile fails when file path contains…
URL: https://github.com/apache/spark/pull/26773#discussion_r354772072
 
 

 ##########
 File path: core/src/main/scala/org/apache/spark/SparkContext.scala
 ##########
 @@ -1538,7 +1538,7 @@ class SparkContext(config: SparkConf) extends Logging {
     val scheme = new URI(schemeCorrectedPath).getScheme
     if (!Array("http", "https", "ftp").contains(scheme)) {
       val fs = hadoopPath.getFileSystem(hadoopConfiguration)
-      val isDir = fs.getFileStatus(hadoopPath).isDirectory
+      val isDir = fs.getFileStatus(new Path(path)).isDirectory
 
 Review comment:
   Is there any official document mention this? e.g. if we extend the path with scheme, then it can't contain spaces.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org