Github user scwf commented on a diff in the pull request:

    https://github.com/apache/spark/pull/3907#discussion_r22635771
  
    --- Diff: core/src/main/scala/org/apache/spark/rdd/HadoopRDD.scala ---
    @@ -198,12 +190,19 @@ class HadoopRDD[K, V](
         if (inputFormat.isInstanceOf[Configurable]) {
           inputFormat.asInstanceOf[Configurable].setConf(jobConf)
         }
    -    val inputSplits = inputFormat.getSplits(jobConf, minPartitions)
    -    val array = new Array[Partition](inputSplits.size)
    -    for (i <- 0 until inputSplits.size) {
    -      array(i) = new HadoopPartition(id, i, inputSplits(i))
    +    // SPARK-5068:catch the exception when the path is not exists
    +    try {
    +      val inputSplits = inputFormat.getSplits(jobConf, minPartitions)
    +      val array = new Array[Partition](inputSplits.size)
    +      for (i <- 0 until inputSplits.size) {
    +        array(i) = new HadoopPartition(id, i, inputSplits(i))
    +      }
    +      array
    +    } catch {
    +      case e: InvalidInputException => {
    --- End diff --
    
    Agree with @chenghao-intel, we'd better handle this in hive module.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to