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

    https://github.com/apache/spark/pull/10835#discussion_r50808701
  
    --- Diff: core/src/main/scala/org/apache/spark/util/JsonProtocol.scala ---
    @@ -284,11 +284,44 @@ private[spark] object JsonProtocol {
       }
     
       def accumulableInfoToJson(accumulableInfo: AccumulableInfo): JValue = {
    +    val name = accumulableInfo.name
         ("ID" -> accumulableInfo.id) ~
    -    ("Name" -> accumulableInfo.name) ~
    -    ("Update" -> accumulableInfo.update.map(new 
JString(_)).getOrElse(JNothing)) ~
    -    ("Value" -> accumulableInfo.value) ~
    -    ("Internal" -> accumulableInfo.internal)
    +    ("Name" -> name) ~
    +    ("Update" -> accumulableInfo.update.map { v => accumValueToJson(name, 
v) }) ~
    +    ("Value" -> accumulableInfo.value.map { v => accumValueToJson(name, v) 
}) ~
    +    ("Internal" -> accumulableInfo.internal) ~
    +    ("Count Failed Values" -> accumulableInfo.countFailedValues)
    +  }
    +
    +  /**
    +   * Serialize the value of an accumulator to JSON.
    +   *
    +   * For accmulators representing internal task metrics, this looks up the 
relevant
    +   * [[AccumulatorParam]] to serialize the value accordingly. For all 
other accumulators,
    +   * this will simply serialize the value as a string.
    +   *
    +   * The behavior here must match that of [[accumValueFromJson]]. TODO: 
add some tests.
    --- End diff --
    
    Is this still a TODO?


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

Reply via email to