07ARB commented on a change in pull request #26773: 
[SPARK-30126][SPARK-30145][CORE]sparkContext.addFile and sparkContext.addJar 
fails when file path contains spaces
URL: https://github.com/apache/spark/pull/26773#discussion_r355291295
 
 

 ##########
 File path: core/src/test/scala/org/apache/spark/SparkContextSuite.scala
 ##########
 @@ -303,7 +345,6 @@ class SparkContextSuite extends SparkFunSuite with 
LocalSparkContext with Eventu
 
       // Invalid jar path will only print the error log, will not add to file 
server.
       sc.addJar("dummy.jar")
-      sc.addJar("")
 
 Review comment:
   yes , we are creating path `val uri = new Path(path).toUri` to get schema , 
if we will pass empty string to create path, then it will get exception 
   
   ```
   Can not create a Path from an empty string
   java.lang.IllegalArgumentException: Can not create a Path from an empty 
string
        at org.apache.hadoop.fs.Path.checkPathArg(Path.java:126)
        at org.apache.hadoop.fs.Path.<init>(Path.java:134)
        at org.apache.spark.SparkContext.addJar(SparkContext.scala:1880)
   ```
   because of this i have remove this code `sc.addJar("")`

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


With regards,
Apache Git Services

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

Reply via email to