redsanket commented on a change in pull request #24498: [SPARK-27605] : Add new 
column "Partition ID" to the tasks table in s…
URL: https://github.com/apache/spark/pull/24498#discussion_r279794352
 
 

 ##########
 File path: core/src/main/scala/org/apache/spark/util/JsonProtocol.scala
 ##########
 @@ -804,9 +805,11 @@ private[spark] object JsonProtocol {
       case Some(values) => values.map(accumulableInfoFromJson)
       case None => Seq.empty[AccumulableInfo]
     }
+    val partitionId = jsonOption(json \ "Partition 
ID").map(_.extract[Int]).getOrElse(-1)
 
     val taskInfo =
       new TaskInfo(taskId, index, attempt, launchTime, executorId, host, 
taskLocality, speculative)
+    taskInfo.setPartitionId(partitionId)
 
 Review comment:
   do we need a setting other vars like gettingResultTime and finishTime seem 
to be accessed 
   taskInfo.gettingResultTime = gettingResultTime
   taskInfo.finishTime = finishTime
   
   May be make it consistent if we need we want setters and make it private for 
others as well?

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

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

Reply via email to