Skip to content

Commit

Permalink
Fixed stupid typo.
Browse files Browse the repository at this point in the history
  • Loading branch information
tdas committed Apr 7, 2014
1 parent cff023c commit d25a86e
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ class BlockManagerMaster(var driverActor: ActorRef, conf: SparkConf) extends Log
* updated block statuses. This is useful when the master is not informed of the given block
* by all block managers.
*/
def getMatchinghBlockIds(
def getMatchingBlockIds(
filter: BlockId => Boolean,
askSlaves: Boolean): Seq[BlockId] = {
val msg = GetMatchingBlockIds(filter, askSlaves)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -390,21 +390,21 @@ class CleanerTester(
toBeCleanedBroadcstIds.isEmpty

private def getRDDBlocks(rddId: Int): Seq[BlockId] = {
blockManager.master.getMatchinghBlockIds( _ match {
blockManager.master.getMatchingBlockIds( _ match {
case RDDBlockId(`rddId`, _) => true
case _ => false
}, askSlaves = true)
}

private def getShuffleBlocks(shuffleId: Int): Seq[BlockId] = {
blockManager.master.getMatchinghBlockIds( _ match {
blockManager.master.getMatchingBlockIds( _ match {
case ShuffleBlockId(`shuffleId`, _, _) => true
case _ => false
}, askSlaves = true)
}

private def getBroadcastBlocks(broadcastId: Long): Seq[BlockId] = {
blockManager.master.getMatchinghBlockIds( _ match {
blockManager.master.getMatchingBlockIds( _ match {
case BroadcastBlockId(`broadcastId`, _) => true
case _ => false
}, askSlaves = true)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -868,23 +868,23 @@ class BlockManagerSuite extends FunSuite with BeforeAndAfter with PrivateMethodT
store.put("list3", list.iterator, StorageLevel.MEMORY_AND_DISK, tellMaster = true)

// getLocations and getBlockStatus should yield the same locations
assert(store.master.getMatchinghBlockIds(_.toString.contains("list"), askSlaves = false).size === 3)
assert(store.master.getMatchinghBlockIds(_.toString.contains("list1"), askSlaves = false).size === 1)
assert(store.master.getMatchingBlockIds(_.toString.contains("list"), askSlaves = false).size === 3)
assert(store.master.getMatchingBlockIds(_.toString.contains("list1"), askSlaves = false).size === 1)

// insert some more blocks
store.put("newlist1", list.iterator, StorageLevel.MEMORY_AND_DISK, tellMaster = true)
store.put("newlist2", list.iterator, StorageLevel.MEMORY_AND_DISK, tellMaster = false)
store.put("newlist3", list.iterator, StorageLevel.MEMORY_AND_DISK, tellMaster = false)

// getLocations and getBlockStatus should yield the same locations
assert(store.master.getMatchinghBlockIds(_.toString.contains("newlist"), askSlaves = false).size === 1)
assert(store.master.getMatchinghBlockIds(_.toString.contains("newlist"), askSlaves = true).size === 3)
assert(store.master.getMatchingBlockIds(_.toString.contains("newlist"), askSlaves = false).size === 1)
assert(store.master.getMatchingBlockIds(_.toString.contains("newlist"), askSlaves = true).size === 3)

val blockIds = Seq(RDDBlockId(1, 0), RDDBlockId(1, 1), RDDBlockId(2, 0))
blockIds.foreach { blockId =>
store.put(blockId, list.iterator, StorageLevel.MEMORY_ONLY, tellMaster = true)
}
val matchedBlockIds = store.master.getMatchinghBlockIds(_ match {
val matchedBlockIds = store.master.getMatchingBlockIds(_ match {
case RDDBlockId(1, _) => true
case _ => false
}, askSlaves = true)
Expand Down

0 comments on commit d25a86e

Please sign in to comment.