HyukjinKwon commented on a change in pull request #29796: URL: https://github.com/apache/spark/pull/29796#discussion_r490687211
########## File path: core/src/main/scala/org/apache/spark/SparkContext.scala ########## @@ -1881,7 +1881,7 @@ class SparkContext(config: SparkConf) extends Logging { if (!fs.exists(hadoopPath)) { throw new FileNotFoundException(s"Jar ${path} not found") } - if (fs.isDirectory(hadoopPath)) { + if (fs.getFileStatus(hadoopPath).isDirectory) { Review comment: @williamhyun, I think they were deprecated to avoid calling redundant `getFileStatus` at [HADOOP-13321](https://issues.apache.org/jira/browse/HADOOP-13321): > These methods have a habit of fostering inefficient call patterns in applications, resulting in multiple redundant getFileStatus calls. You can have one util that takes both `FileStatus` and `path` for example. If you'd like to take more conservative, you can keep some valid calls (with `fs.exists()` as an example). ---------------------------------------------------------------- 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: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org