srowen 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_r298233096
##########
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:
I see, but can you fix that problem by making the thriftserver resilient to
app errors like this?
I may be incorrect that there's any use case for adding a JAR that can't yet
be accessed. If so I think you just want to unilaterally check for the
existence of the JAR. This shouldn't be a config or API option.
----------------------------------------------------------------
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]