@@ -172,16 +172,13 @@ class StorageStatus(val blockManagerId: BlockManagerId, val maxMem: Long) {
172172 def memRemaining : Long = maxMem - memUsed
173173
174174 /** Return the memory used by this block manager. */
175- def memUsed : Long =
176- _nonRddStorageInfo._1 + _rddBlocks.keys.toSeq.map(memUsedByRdd).sum
175+ def memUsed : Long = _nonRddStorageInfo._1 + _rddBlocks.keys.toSeq.map(memUsedByRdd).sum
177176
178177 /** Return the disk space used by this block manager. */
179- def diskUsed : Long =
180- _nonRddStorageInfo._2 + _rddBlocks.keys.toSeq.map(diskUsedByRdd).sum
178+ def diskUsed : Long = _nonRddStorageInfo._2 + _rddBlocks.keys.toSeq.map(diskUsedByRdd).sum
181179
182180 /** Return the off-heap space used by this block manager. */
183- def offHeapUsed : Long =
184- _nonRddStorageInfo._3 + _rddBlocks.keys.toSeq.map(offHeapUsedByRdd).sum
181+ def offHeapUsed : Long = _nonRddStorageInfo._3 + _rddBlocks.keys.toSeq.map(offHeapUsedByRdd).sum
185182
186183 /** Return the memory used by the given RDD in this block manager in O(1) time. */
187184 def memUsedByRdd (rddId : Int ): Long = _rddStorageInfo.get(rddId).map(_._1).getOrElse(0L )
@@ -246,7 +243,7 @@ private[spark] object StorageUtils {
246243 val rddId = rddInfo.id
247244 // Assume all blocks belonging to the same RDD have the same storage level
248245 val storageLevel = statuses
249- .map (_.rddStorageLevel(rddId)).flatMap(s => s ).headOption.getOrElse(StorageLevel .NONE )
246+ .flatMap (_.rddStorageLevel(rddId)).headOption.getOrElse(StorageLevel .NONE )
250247 val numCachedPartitions = statuses.map(_.numRddBlocksById(rddId)).sum
251248 val memSize = statuses.map(_.memUsedByRdd(rddId)).sum
252249 val diskSize = statuses.map(_.diskUsedByRdd(rddId)).sum
0 commit comments