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

    https://github.com/apache/spark/pull/19487#discussion_r144580099
  
    --- Diff: 
core/src/main/scala/org/apache/spark/internal/io/HadoopMapReduceCommitProtocol.scala
 ---
    @@ -48,6 +49,16 @@ class HadoopMapReduceCommitProtocol(jobId: String, path: 
String)
       @transient private var committer: OutputCommitter = _
     
       /**
    +   * Checks whether there are files to be committed to a valid output 
location.
    +   *
    +   * As committing and aborting a job occurs on driver, where 
`addedAbsPathFiles` is always null,
    +   * it is necessary to check whether a valid output path is specified.
    +   * [[HadoopMapReduceCommitProtocol#path]] need not be a valid 
[[org.apache.hadoop.fs.Path]] for
    +   * committers not writing to distributed file systems.
    +   */
    +  private val hasValidPath = Try { new Path(path) }.isSuccess
    --- End diff --
    
    I think we should explicitly catch the exception BTW.


---

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

Reply via email to