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_r298244156
 
 

 ##########
 File path: core/src/main/scala/org/apache/spark/SparkContext.scala
 ##########
 @@ -1764,17 +1764,21 @@ class SparkContext(config: SparkConf) extends Logging {
     listenerBus.post(SparkListenerUnpersistRDD(rddId))
   }
 
+  def addJar(path: String) {
+    addJar(path, false)
+  }
+
   /**
    * Adds a JAR dependency for all tasks to be executed on this `SparkContext` 
in the future.
    *
    * If a jar is added during execution, it will not be available until the 
next TaskSet starts.
    *
    * @param path can be either a local file, a file in HDFS (or other 
Hadoop-supported filesystems),
    * an HTTP, HTTPS or FTP URI, or local:/path for a file on every worker node.
-   *
+   * @param check when true, check jar file exists
    * @note A path can be added only once. Subsequent additions of the same 
path are ignored.
    */
-  def addJar(path: String) {
+  def addJar(path: String, check: Boolean) {
 
 Review comment:
   Hm, Since always sql action make this error. So I just want to check for SQL 
AddJar behavior
   If we don't check this in driver level,  executor level will return error , 
if we ignore executor's error like this. User can just know it when executor 
can't find class.

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