diff options
author | Imran Rashid <imran@quantifind.com> | 2013-03-03 16:46:45 -0800 |
---|---|---|
committer | Imran Rashid <imran@quantifind.com> | 2013-03-03 16:46:45 -0800 |
commit | 0bd1d00c2ab75c6133269611d498cac321d9d389 (patch) | |
tree | 30c239317de138512c0f462111fa6344427bbe9c | |
parent | f1006b99ffce497f4cad79d9bddef278e360056d (diff) | |
download | spark-0bd1d00c2ab75c6133269611d498cac321d9d389.tar.gz spark-0bd1d00c2ab75c6133269611d498cac321d9d389.tar.bz2 spark-0bd1d00c2ab75c6133269611d498cac321d9d389.zip |
minor cleanup based on feedback in review request
4 files changed, 24 insertions, 24 deletions
diff --git a/core/src/main/scala/spark/storage/BlockFetchTracker.scala b/core/src/main/scala/spark/storage/BlockFetchTracker.scala new file mode 100644 index 0000000000..ababb04305 --- /dev/null +++ b/core/src/main/scala/spark/storage/BlockFetchTracker.scala @@ -0,0 +1,10 @@ +package spark.storage + +private[spark] trait BlockFetchTracker { + def totalBlocks : Int + def numLocalBlocks: Int + def numRemoteBlocks: Int + def remoteFetchTime : Long + def remoteFetchWaitTime: Long + def remoteBytesRead : Long +} diff --git a/core/src/main/scala/spark/storage/BlockManager.scala b/core/src/main/scala/spark/storage/BlockManager.scala index 677b2e6a42..4964060b1c 100644 --- a/core/src/main/scala/spark/storage/BlockManager.scala +++ b/core/src/main/scala/spark/storage/BlockManager.scala @@ -843,28 +843,6 @@ object BlockManager extends Logging { } } - -private[spark] trait BlockFetchTracker { - def totalBlocks : Int - def numLocalBlocks: Int - def numRemoteBlocks: Int - def remoteFetchTime : Long - def remoteFetchWaitTime: Long - def remoteBytesRead : Long -} - -private[spark] trait DelegateBlockFetchTracker extends BlockFetchTracker { - var delegate : BlockFetchTracker = _ - def setDelegate(d: BlockFetchTracker) {delegate = d} - def totalBlocks = delegate.totalBlocks - def numLocalBlocks = delegate.numLocalBlocks - def numRemoteBlocks = delegate.numRemoteBlocks - def remoteFetchTime = delegate.remoteFetchTime - def remoteFetchWaitTime = delegate.remoteFetchWaitTime - def remoteBytesRead = delegate.remoteBytesRead -} - - class BlockFetcherIterator( private val blockManager: BlockManager, val blocksByAddress: Seq[(BlockManagerId, Seq[(String, Long)])] diff --git a/core/src/main/scala/spark/storage/DelegateBlockFetchTracker.scala b/core/src/main/scala/spark/storage/DelegateBlockFetchTracker.scala new file mode 100644 index 0000000000..5c491877ba --- /dev/null +++ b/core/src/main/scala/spark/storage/DelegateBlockFetchTracker.scala @@ -0,0 +1,12 @@ +package spark.storage + +private[spark] trait DelegateBlockFetchTracker extends BlockFetchTracker { + var delegate : BlockFetchTracker = _ + def setDelegate(d: BlockFetchTracker) {delegate = d} + def totalBlocks = delegate.totalBlocks + def numLocalBlocks = delegate.numLocalBlocks + def numRemoteBlocks = delegate.numRemoteBlocks + def remoteFetchTime = delegate.remoteFetchTime + def remoteFetchWaitTime = delegate.remoteFetchWaitTime + def remoteBytesRead = delegate.remoteBytesRead +} diff --git a/core/src/main/scala/spark/util/Distribution.scala b/core/src/main/scala/spark/util/Distribution.scala index ccd9232c8b..24738b4307 100644 --- a/core/src/main/scala/spark/util/Distribution.scala +++ b/core/src/main/scala/spark/util/Distribution.scala @@ -3,11 +3,11 @@ package spark.util import java.io.PrintStream /** - * util for getting some stats from a small sample of numeric values, with some handy summary functions + * Util for getting some stats from a small sample of numeric values, with some handy summary functions. * * Entirely in memory, not intended as a good way to compute stats over large data sets. * - * assumes you are giving it a non-empty set of data + * Assumes you are giving it a non-empty set of data */ class Distribution(val data: Array[Double], val startIdx: Int, val endIdx: Int) { require(startIdx < endIdx) |