Skip to content

Commit 3459ab2

Browse files
author
Andrew Or
committed
Fix tests
1 parent 832443c commit 3459ab2

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

core/src/main/scala/org/apache/spark/util/JsonProtocol.scala

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -795,15 +795,17 @@ private[spark] object JsonProtocol {
795795
def rddInfoFromJson(json: JValue): RDDInfo = {
796796
val rddId = (json \ "RDD ID").extract[Int]
797797
val name = (json \ "Name").extract[String]
798-
val scope = Utils.jsonOption(json \ "Scope").map(_.extract[RDDOperationScope])
798+
val scope = Utils.jsonOption(json \ "Scope")
799+
.map(_.extract[String])
800+
.map(RDDOperationScope.fromJson)
799801
val parentIds = Utils.jsonOption(json \ "Parent IDs")
800802
.map { l => l.extract[List[JValue]].map(_.extract[Int]) }
801803
.getOrElse(Seq.empty)
802804
val storageLevel = storageLevelFromJson(json \ "Storage Level")
803805
val numPartitions = (json \ "Number of Partitions").extract[Int]
804806
val numCachedPartitions = (json \ "Number of Cached Partitions").extract[Int]
805807
val memSize = (json \ "Memory Size").extract[Long]
806-
// fallback to tachyon for backward compatability
808+
// fallback to tachyon for backward compatibility
807809
val externalBlockStoreSize = (json \ "ExternalBlockStore Size").toSome
808810
.getOrElse(json \ "Tachyon Size").extract[Long]
809811
val diskSize = (json \ "Disk Size").extract[Long]

0 commit comments

Comments
 (0)