You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2022/03/30 03:01:51 UTC

[GitHub] [spark] cloud-fan commented on a change in pull request #35995: [SPARK-38679][CORE] Expose the number partitions in a stage to TaskContext

cloud-fan commented on a change in pull request #35995:
URL: https://github.com/apache/spark/pull/35995#discussion_r838075213



##########
File path: core/src/main/scala/org/apache/spark/BarrierTaskContext.scala
##########
@@ -215,6 +215,8 @@ class BarrierTaskContext private[spark] (
 
   override def partitionId(): Int = taskContext.partitionId()
 
+  override def numPartitions(): Int = taskContext.numPartitions()

Review comment:
       We can remove `lazy val numTasks` in this file and use `numPartitions()` directly.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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