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

    https://github.com/apache/spark/pull/19848#discussion_r154168397
  
    --- Diff: 
core/src/main/scala/org/apache/spark/mapred/SparkHadoopMapRedUtil.scala ---
    @@ -70,7 +79,14 @@ object SparkHadoopMapRedUtil extends Logging {
           if (shouldCoordinateWithDriver) {
             val outputCommitCoordinator = SparkEnv.get.outputCommitCoordinator
             val taskAttemptNumber = TaskContext.get().attemptNumber()
    -        val canCommit = outputCommitCoordinator.canCommit(jobId, splitId, 
taskAttemptNumber)
    +        var canCommit: Boolean = true
    +        // This checks whether the commitTask provided by stageId, which 
if not the canCommit
    +        // will use jobId as stageId to decide whether the commit should 
be possible
    +        if (stageId != -1) {
    --- End diff --
    
    Thank you very much, Marcelo. I had a misunderstanding about Mirdul's 
comment. We can get stageId from TaskContext.get as he suggested there. That 
way everything is much easier. I will update this PR soon after finish testing. 
Thank you again. 


---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to