warrenzhu25 commented on a change in pull request #28965:
URL: https://github.com/apache/spark/pull/28965#discussion_r448484002
##########
File path: core/src/main/scala/org/apache/spark/util/JsonProtocol.scala
##########
@@ -1078,8 +1078,12 @@ private[spark] object JsonProtocol {
val blockManagerAddress = blockManagerIdFromJson(json \ "Block Manager
Address")
val shuffleId = (json \ "Shuffle ID").extract[Int]
val mapId = (json \ "Map ID").extract[Long]
- val mapIndex = (json \ "Map Index") match {
- case JNothing => 0
+ val mapIndex = json \ "Map Index" match {
+ case JNothing =>
+ // Note, we use the invalid value -2 here to fill the map index
for backward
+ // compatibility. Otherwise, the fetch failed event will be
dropped when the history
+ // server loads the event log written by the Spark version before
3.0.
+ -2
Review comment:
Any special reasons using `-2` instead of `-1`? BTW, I'm unsure whether
this filed will be displayed in UI, if so, we better show `Unknown` for invalid
value in UI.
----------------------------------------------------------------
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]