Github user zsxwing commented on a diff in the pull request: https://github.com/apache/spark/pull/6672#discussion_r33155599 --- Diff: core/src/main/scala/org/apache/spark/util/JsonProtocol.scala --- @@ -848,6 +908,60 @@ private[spark] object JsonProtocol { new ExecutorInfo(executorHost, totalCores, logUrls) } + def blockUpdatedInfoFromJson(json: JValue): BlockUpdatedInfo = { + BlockUpdatedInfo( + blockManagerIdFromJson(json \ "Block Manager ID"), + blockIdFromJson(json \ "Block ID"), + storageLevelFromJson(json \ "Storage Level"), + (json \ "Memory Size").extract[Long], + (json \ "Disk Size").extract[Long], + (json \ "ExternalBlockStore Size").extract[Long] + ) + } + + def blockIdFromJson(json: JValue): BlockId = { + val rddBlockId = Utils.getFormattedClassName(RDDBlockId) + val shuffleBlockId = Utils.getFormattedClassName(ShuffleBlockId) + val shuffleDataBlockId = Utils.getFormattedClassName(ShuffleDataBlockId) + val shuffleIndexBlockId = Utils.getFormattedClassName(ShuffleIndexBlockId) + val broadcastBlockId = Utils.getFormattedClassName(BroadcastBlockId) + val taskResultBlockId = Utils.getFormattedClassName(TaskResultBlockId) + val streamBlockId = Utils.getFormattedClassName(StreamBlockId) + + (json \ "Class Name").extract[String] match { --- End diff -- `ReplayListenerBus` will log exceptions except IOException. But it also skips the rest content in the file. BTW, `scala.MatchError` is a `RuntimeException`.
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org