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

    https://github.com/apache/spark/pull/22240#discussion_r212863507
  
    --- Diff: core/src/main/scala/org/apache/spark/BarrierTaskContext.scala ---
    @@ -21,25 +21,31 @@ import java.util.{Properties, Timer, TimerTask}
     
     import scala.concurrent.duration._
     import scala.language.postfixOps
    -
    -import org.apache.spark.annotation.{Experimental, Since}
    +import org.apache.spark.annotation.{DeveloperApi, Experimental, Since}
     import org.apache.spark.executor.TaskMetrics
     import org.apache.spark.memory.TaskMemoryManager
     import org.apache.spark.metrics.MetricsSystem
     import org.apache.spark.rpc.{RpcEndpointRef, RpcTimeout}
     import org.apache.spark.util.{RpcUtils, Utils}
     
    -/** A [[TaskContext]] with extra info and tooling for a barrier stage. */
    -class BarrierTaskContext(
    +/**
    + * :: Experimental ::
    + * A [[TaskContext]] with extra contextual info and tooling for tasks in a 
barrier stage.
    + * Use [[BarrierTaskContext#get]] to obtain the barrier context for a 
running barrier task.
    + */
    +@Experimental
    +@Since("2.4.0")
    +class BarrierTaskContext private[spark] (
    --- End diff --
    
    Made the constructor package private to force users get it from `#get()`.


---

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

Reply via email to