Github user andrewor14 commented on a diff in the pull request:
https://github.com/apache/spark/pull/654#discussion_r16997720
--- Diff: core/src/main/scala/org/apache/spark/util/JsonProtocol.scala ---
@@ -467,12 +469,14 @@ private[spark] object JsonProtocol {
def blockManagerAddedFromJson(json: JValue):
SparkListenerBlockManagerAdded = {
val blockManagerId = blockManagerIdFromJson(json \ "Block Manager ID")
val maxMem = (json \ "Maximum Memory").extract[Long]
- SparkListenerBlockManagerAdded(blockManagerId, maxMem)
+ val time = Utils.jsonOption(json \
"Timestamp").map(_.extract[Long]).getOrElse(-1L)
+ SparkListenerBlockManagerAdded(time, blockManagerId, maxMem)
}
def blockManagerRemovedFromJson(json: JValue):
SparkListenerBlockManagerRemoved = {
val blockManagerId = blockManagerIdFromJson(json \ "Block Manager ID")
- SparkListenerBlockManagerRemoved(blockManagerId)
+ val time = (json \ "Timestamp").extract[Option[Long]].getOrElse(-1L)
--- End diff --
minor: `jsonOption` here, as you have done in L472?
---
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]