Github user superbobry commented on a diff in the pull request:
https://github.com/apache/spark/pull/19992#discussion_r158701191
--- Diff: core/src/main/scala/org/apache/spark/util/JsonProtocol.scala ---
@@ -444,12 +444,15 @@ private[spark] object JsonProtocol {
("Disk Size" -> rddInfo.diskSize)
}
- def storageLevelToJson(storageLevel: StorageLevel): JValue = {
- ("Use Disk" -> storageLevel.useDisk) ~
- ("Use Memory" -> storageLevel.useMemory) ~
- ("Deserialized" -> storageLevel.deserialized) ~
- ("Replication" -> storageLevel.replication)
- }
+ def storageLevelToJson(storageLevel: StorageLevel): JValue =
+ storageLevel.name match {
--- End diff --
Actually, after seeing the compilation error, I recall why I went with a
match instead of `getOrElse` -- the former does not require an explicit
conversion to JString.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]