From d25a86e7ae61a400764cb5f9c47f55f42f32220f Mon Sep 17 00:00:00 2001 From: Tathagata Das Date: Mon, 7 Apr 2014 16:11:19 -0700 Subject: [PATCH] Fixed stupid typo. --- .../org/apache/spark/storage/BlockManagerMaster.scala | 2 +- .../scala/org/apache/spark/ContextCleanerSuite.scala | 6 +++--- .../org/apache/spark/storage/BlockManagerSuite.scala | 10 +++++----- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/core/src/main/scala/org/apache/spark/storage/BlockManagerMaster.scala b/core/src/main/scala/org/apache/spark/storage/BlockManagerMaster.scala index 4191f4e4c71e4..497a0f6eb5c1d 100644 --- a/core/src/main/scala/org/apache/spark/storage/BlockManagerMaster.scala +++ b/core/src/main/scala/org/apache/spark/storage/BlockManagerMaster.scala @@ -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) diff --git a/core/src/test/scala/org/apache/spark/ContextCleanerSuite.scala b/core/src/test/scala/org/apache/spark/ContextCleanerSuite.scala index c828e4ebcf924..5b6120d965c5c 100644 --- a/core/src/test/scala/org/apache/spark/ContextCleanerSuite.scala +++ b/core/src/test/scala/org/apache/spark/ContextCleanerSuite.scala @@ -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) diff --git a/core/src/test/scala/org/apache/spark/storage/BlockManagerSuite.scala b/core/src/test/scala/org/apache/spark/storage/BlockManagerSuite.scala index fb1920bd47fb1..9aaf3601e430e 100644 --- a/core/src/test/scala/org/apache/spark/storage/BlockManagerSuite.scala +++ b/core/src/test/scala/org/apache/spark/storage/BlockManagerSuite.scala @@ -868,8 +868,8 @@ 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) @@ -877,14 +877,14 @@ class BlockManagerSuite extends FunSuite with BeforeAndAfter with PrivateMethodT 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)