Github user superbobry commented on a diff in the pull request:
https://github.com/apache/spark/pull/19992#discussion_r157311572
--- Diff: core/src/main/scala/org/apache/spark/util/JsonProtocol.scala ---
@@ -988,12 +997,16 @@ private[spark] object JsonProtocol {
rddInfo
}
- def storageLevelFromJson(json: JValue): StorageLevel = {
- val useDisk = (json \ "Use Disk").extract[Boolean]
- val useMemory = (json \ "Use Memory").extract[Boolean]
- val deserialized = (json \ "Deserialized").extract[Boolean]
- val replication = (json \ "Replication").extract[Int]
- StorageLevel(useDisk, useMemory, deserialized, replication)
+ def storageLevelFromJson(json: JValue): StorageLevel = json match {
+ case _: JString => StorageLevel.fromString(json.extract[String])
--- End diff --
Done.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]