Github user pwendell commented on a diff in the pull request:
https://github.com/apache/spark/pull/96#discussion_r10394468
--- Diff: core/src/main/scala/org/apache/spark/storage/MemoryStore.scala ---
@@ -236,13 +236,18 @@ private class MemoryStore(blockManager: BlockManager,
maxMemory: Long)
while (maxMemory - (currentMemory - selectedMemory) < space &&
iterator.hasNext) {
val pair = iterator.next()
val blockId = pair.getKey
- if (rddToAdd.isDefined && rddToAdd == getRddId(blockId)) {
- logInfo("Will not store " + blockIdToAdd + " as it would
require dropping another " +
- "block from the same RDD")
- return false
+ // Apply the same-RDD rule for cache replacement. Quoted from the
+ // original RDD paper:
+ //
+ // When a new RDD partition is computed but there is not
enough
--- End diff --
Hey @liancheng I think it's okay to remove this quote. If you look at the
scaladoc it already explains the intended policy wrt to partitions in the same
RDD - so I think that is sufficient. The scaladoc says "which leads to a
wasteful cyclic replacement pattern for RDDs don't fit into memory that we want
to avoid"
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---