Github user JoshRosen commented on a diff in the pull request:

    https://github.com/apache/spark/pull/6672#discussion_r33067314
  
    --- 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 --
    
    What happens if we get an unknown class name here?  That situation might 
occur if we're parsing a newer event log using an older version of the Spark 
HistoryServer.  This point might be moot if we're not persisting these events 
to the log (see my earlier comment about EventLoggingListener).  If this is 
safe due to lack of persistence, maybe we should just leave a note here 
explaining that.


---
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 [email protected] or file a JIRA ticket
with INFRA.
---

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

Reply via email to