Skip to content
Snippets Groups Projects
Commit 0bd1d00c authored by Imran Rashid's avatar Imran Rashid
Browse files

minor cleanup based on feedback in review request

parent f1006b99
No related branches found
No related tags found
No related merge requests found
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
}
......@@ -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)])]
......
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
}
......@@ -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)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment