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/02/22 08:27:39 UTC

[GitHub] [spark] stczwd commented on a change in pull request #35185: [SPARK-37831][CORE] add task partition id in TaskInfo and Task Metrics

stczwd commented on a change in pull request #35185:
URL: https://github.com/apache/spark/pull/35185#discussion_r811685761



##########
File path: core/src/main/scala/org/apache/spark/scheduler/TaskInfo.scala
##########
@@ -35,12 +35,34 @@ class TaskInfo(
      */
     val index: Int,
     val attemptNumber: Int,
+    /**
+     * The actual RDD partition ID in this task.
+     * The ID of the RDD partition is always same across task attempts.
+     * This will be -1 for historical data, and available for all applications since 3.3.

Review comment:
       sure

##########
File path: core/src/main/scala/org/apache/spark/scheduler/TaskInfo.scala
##########
@@ -35,12 +35,34 @@ class TaskInfo(
      */
     val index: Int,
     val attemptNumber: Int,
+    /**
+     * The actual RDD partition ID in this task.
+     * The ID of the RDD partition is always same across task attempts.
+     * This will be -1 for historical data, and available for all applications since 3.3.
+     */
+    val partitionId: Int,
     val launchTime: Long,
     val executorId: String,
     val host: String,
     val taskLocality: TaskLocality.TaskLocality,
     val speculative: Boolean) {
 
+  def this(

Review comment:
       Sure

##########
File path: core/src/main/scala/org/apache/spark/scheduler/TaskInfo.scala
##########
@@ -35,12 +35,34 @@ class TaskInfo(
      */
     val index: Int,
     val attemptNumber: Int,
+    /**
+     * The actual RDD partition ID in this task.
+     * The ID of the RDD partition is always same across task attempts.
+     * This will be -1 for historical data, and available for all applications since 3.3.
+     */
+    val partitionId: Int,
     val launchTime: Long,
     val executorId: String,
     val host: String,
     val taskLocality: TaskLocality.TaskLocality,
     val speculative: Boolean) {
 
+  def this(
+      taskId: Long,
+      /**
+       * The index of this task within its task set. Not necessarily the same as the ID of the RDD
+       * partition that the task is computing.

Review comment:
       I will remove this.




-- 
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