Github user edwinalu commented on a diff in the pull request:
https://github.com/apache/spark/pull/21221#discussion_r198683408
--- Diff: core/src/main/scala/org/apache/spark/status/api/v1/api.scala ---
@@ -98,14 +102,48 @@ class ExecutorSummary private[spark](
val removeReason: Option[String],
val executorLogs: Map[String, String],
val memoryMetrics: Option[MemoryMetrics],
- val blacklistedInStages: Set[Int])
+ val blacklistedInStages: Set[Int],
+ @JsonSerialize(using = classOf[PeakMemoryMetricsSerializer])
+ @JsonDeserialize(using = classOf[PeakMemoryMetricsDeserializer])
+ val peakMemoryMetrics: Option[Array[Long]])
class MemoryMetrics private[spark](
val usedOnHeapStorageMemory: Long,
val usedOffHeapStorageMemory: Long,
val totalOnHeapStorageMemory: Long,
val totalOffHeapStorageMemory: Long)
+/** deserialzer for peakMemoryMetrics: convert to array ordered by metric
name */
+class PeakMemoryMetricsDeserializer private[spark] extends
JsonDeserializer[Option[Array[Long]]] {
--- End diff --
This is odd, but I can't seem to comment on your earlier comment. Regarding
having a serializer/deserializer, I also don't have strong feelings -- it makes
it more readable, but also takes up more space in the history log.
Regarding this comment, thanks, I hadn't realized the placement meant that
it marked the constructor. It's meant for the class, and I'll move.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]