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

    https://github.com/apache/spark/pull/20082#discussion_r158898080
  
    --- Diff: core/src/main/scala/org/apache/spark/TaskContext.scala ---
    @@ -150,6 +150,11 @@ abstract class TaskContext extends Serializable {
        */
       def stageId(): Int
     
    +  /**
    +   * An ID that is unique to the stage attempt that this task belongs to.
    +   */
    +  def stageAttemptId(): Int
    --- End diff --
    
    Yeah, if we are defining `stageAttemptId` from scratch, I would go for 
`stageAttemptNumber`.  However `stageAttemptId` are already used elsewhere in 
the codebase, Like in 
[Task.scala](https://github.com/apache/spark/blob/ded6d27e4eb02e4530015a95794e6ed0586faaa7/core/src/main/scala/org/apache/spark/scheduler/Task.scala#L55).
 I think it's more important to be consistent.
    
    However I could update the comment to reflect the attempt number part if 
you wish


---

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

Reply via email to