From 0bd1d00c2ab75c6133269611d498cac321d9d389 Mon Sep 17 00:00:00 2001
From: Imran Rashid <imran@quantifind.com>
Date: Sun, 3 Mar 2013 16:46:45 -0800
Subject: [PATCH] minor cleanup based on feedback in review request

---
 .../spark/storage/BlockFetchTracker.scala     | 10 +++++++++
 .../scala/spark/storage/BlockManager.scala    | 22 -------------------
 .../storage/DelegateBlockFetchTracker.scala   | 12 ++++++++++
 .../main/scala/spark/util/Distribution.scala  |  4 ++--
 4 files changed, 24 insertions(+), 24 deletions(-)
 create mode 100644 core/src/main/scala/spark/storage/BlockFetchTracker.scala
 create mode 100644 core/src/main/scala/spark/storage/DelegateBlockFetchTracker.scala

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)
-- 
GitLab