diff options
author | jerryshao <saisai.shao@intel.com> | 2013-05-30 17:55:11 +0800 |
---|---|---|
committer | jerryshao <saisai.shao@intel.com> | 2013-05-31 09:32:52 +0800 |
commit | 926f41cc522def181c167b71dc919a0759c5d3f6 (patch) | |
tree | 3c4ff26414b1271ed1fd1a6ae8e198d322700eea | |
parent | ef77bb73c66ce938e409cbbac32b67badaa5c57d (diff) | |
download | spark-926f41cc522def181c167b71dc919a0759c5d3f6.tar.gz spark-926f41cc522def181c167b71dc919a0759c5d3f6.tar.bz2 spark-926f41cc522def181c167b71dc919a0759c5d3f6.zip |
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) |