Github user srowen commented on a diff in the pull request:
https://github.com/apache/spark/pull/19992#discussion_r157262641
--- Diff: core/src/main/scala/org/apache/spark/util/JsonProtocol.scala ---
@@ -444,11 +444,20 @@ 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 match {
+ case StorageLevel.NONE => "NONE"
--- End diff --
Agree, that would be more robust.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]