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

    https://github.com/apache/spark/pull/22165#discussion_r218328998
  
    --- Diff: core/src/main/scala/org/apache/spark/BarrierCoordinator.scala ---
    @@ -84,20 +88,20 @@ private[spark] class BarrierCoordinator(
     
       /**
        * Provide the current state of a barrier() call. A state is created 
when a new stage attempt
    -   * sends out a barrier() call, and recycled on stage completed.
    +   * sends out a barrier() call, and recycled on stage completed. Visible 
for testing.
        *
        * @param barrierId Identifier of the barrier stage that make a 
barrier() call.
        * @param numTasks Number of tasks of the barrier stage, all barrier() 
calls from the stage shall
        *                 collect `numTasks` requests to succeed.
        */
    -  private class ContextBarrierState(
    +  private[spark] class ContextBarrierState(
           val barrierId: ContextBarrierId,
           val numTasks: Int) {
     
         // There may be multiple barrier() calls from a barrier stage attempt, 
`barrierEpoch` is used
         // to identify each barrier() call. It shall get increased when a 
barrier() call succeeds, or
         // reset when a barrier() call fails due to timeout.
    -    private var barrierEpoch: Int = 0
    +    private[spark] var barrierEpoch: Int = 0
    --- End diff --
    
    Make sense, done in ec8466a。


---

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

Reply via email to