diff options
author | Tathagata Das <tathagata.das1565@gmail.com> | 2012-07-27 18:33:32 +0000 |
---|---|---|
committer | Tathagata Das <tathagata.das1565@gmail.com> | 2012-07-27 18:33:32 +0000 |
commit | d1eee44a0312e89dea5da803dc3f87e25a024c82 (patch) | |
tree | 1eea72501e81021dc2b8b11d74d027f5f50b1956 | |
parent | d1b7f41671feb6e17e98383b1770757b4941cc3b (diff) | |
download | spark-d1eee44a0312e89dea5da803dc3f87e25a024c82.tar.gz spark-d1eee44a0312e89dea5da803dc3f87e25a024c82.tar.bz2 spark-d1eee44a0312e89dea5da803dc3f87e25a024c82.zip |
Fixed more stuff in BoundedMemoryCache.
-rw-r--r-- | core/src/main/scala/spark/BoundedMemoryCache.scala | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/core/src/main/scala/spark/BoundedMemoryCache.scala b/core/src/main/scala/spark/BoundedMemoryCache.scala index 5ea5c303bd..6fe0b94297 100644 --- a/core/src/main/scala/spark/BoundedMemoryCache.scala +++ b/core/src/main/scala/spark/BoundedMemoryCache.scala @@ -91,10 +91,14 @@ class BoundedMemoryCache(maxBytes: Long) extends Cache with Logging { protected def reportEntryDropped(datasetId: Any, partition: Int, entry: Entry) { logInfo("Dropping key (%s, %d) of size %d to make space".format(datasetId, partition, entry.size)) // TODO: remove BoundedMemoryCache - datasetId match { - case rddDatasetId: (Int, Int) => - SparkEnv.get.cacheTracker.dropEntry(rddDatasetId._2, partition) - case _ => + + val (keySpaceId, innerDatasetId) = datasetId.asInstanceOf[(Any, Any)] + innerDatasetId match { + case rddId: Int => + SparkEnv.get.cacheTracker.dropEntry(rddId, partition) + case broadcastUUID: java.util.UUID => + // TODO: Maybe something should be done if the broadcasted variable falls out of cache + case _ => } } } |