Skip to content
Snippets Groups Projects
Commit 7be1c7b3 authored by Ankur Dave's avatar Ankur Dave
Browse files

Report entry dropping in BoundedMemoryCache

parent 816d4e58
No related branches found
No related tags found
No related merge requests found
......@@ -70,5 +70,6 @@ class BoundedMemoryCache extends Cache with Logging {
protected def dropEntry(key: Any, entry: Entry) {
logInfo("Dropping key %s of size %d to make space".format(key, entry.size))
SparkEnv.get.cacheTracker.dropEntry(key)
}
}
......@@ -143,6 +143,17 @@ class CacheTracker(isMaster: Boolean, theCache: Cache) extends Logging {
}
}
// Reports that an entry has been dropped from the cache
def dropEntry(key: Any) {
key match {
case (keySpaceId: Long, (rddId: Int, partition: Int)) =>
val host = System.getProperty("spark.hostname", Utils.localHostName)
trackerActor !! DroppedFromCache(rddId, partition, host)
case _ =>
logWarning("Unknown key format: %s".format(key))
}
}
def stop() {
trackerActor !? StopCacheTracker
registeredRddIds.clear()
......
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