diff options
author | Matei Zaharia <matei@eecs.berkeley.edu> | 2013-06-07 22:43:18 -0700 |
---|---|---|
committer | Matei Zaharia <matei@eecs.berkeley.edu> | 2013-06-07 22:43:18 -0700 |
commit | c8fc423bc2d6f9ed571bd0ad8c4c446650c72548 (patch) | |
tree | 3fd19a9bbaf982026eb4ed3227c094b40b599309 | |
parent | c9ca0a4a588b4c7dc553b155336ae5b95aa9ddd4 (diff) | |
parent | 926f41cc522def181c167b71dc919a0759c5d3f6 (diff) | |
download | spark-c8fc423bc2d6f9ed571bd0ad8c4c446650c72548.tar.gz spark-c8fc423bc2d6f9ed571bd0ad8c4c446650c72548.tar.bz2 spark-c8fc423bc2d6f9ed571bd0ad8c4c446650c72548.zip |
Merge pull request #631 from jerryshao/master
Fix block manager UI display issue when enable spark.cleaner.ttl
-rw-r--r-- | core/src/main/scala/spark/storage/StorageUtils.scala | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/core/src/main/scala/spark/storage/StorageUtils.scala b/core/src/main/scala/spark/storage/StorageUtils.scala index 8f52168c24..81e607868d 100644 --- a/core/src/main/scala/spark/storage/StorageUtils.scala +++ b/core/src/main/scala/spark/storage/StorageUtils.scala @@ -64,12 +64,12 @@ object StorageUtils { // Find the id of the RDD, e.g. rdd_1 => 1 val rddId = rddKey.split("_").last.toInt // Get the friendly name for the rdd, if available. - val rdd = sc.persistentRdds(rddId) - val rddName = Option(rdd.name).getOrElse(rddKey) - val rddStorageLevel = rdd.getStorageLevel - - RDDInfo(rddId, rddName, rddStorageLevel, rddBlocks.length, rdd.partitions.size, memSize, diskSize) - }.toArray + sc.persistentRdds.get(rddId).map { r => + val rddName = Option(r.name).getOrElse(rddKey) + val rddStorageLevel = r.getStorageLevel + RDDInfo(rddId, rddName, rddStorageLevel, rddBlocks.length, r.partitions.size, memSize, diskSize) + } + }.flatMap(x => x).toArray scala.util.Sorting.quickSort(rddInfos) |