AngersZhuuuu commented on a change in pull request #24909: [SPARK-28106][SQL] 
When Spark SQL use  "add jar" ,  before add to SparkContext, check  jar path 
exist first.
URL: https://github.com/apache/spark/pull/24909#discussion_r303058642
 
 

 ##########
 File path: core/src/test/scala/org/apache/spark/SparkContextSuite.scala
 ##########
 @@ -165,6 +165,17 @@ class SparkContextSuite extends SparkFunSuite with 
LocalSparkContext with Eventu
     }
   }
 
+  test("add hdfs jar files not exists") {
+    try {
+      val jarPath = "hdfs:///no/path/to/TestUDTF.jar"
+      sc = new SparkContext(new 
SparkConf().setAppName("test").setMaster("local"))
+      sc.addJar(jarPath)
+      assert(sc.listJars().forall(!_..contains("TestUDTF.jar")))
 
 Review comment:
   == 
   Before commit code,  accidentally hit the keyboard, have change it .

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