spark-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mateiz <...@git.apache.org>
Subject [GitHub] spark pull request: Patch for SPARK-942
Date Mon, 03 Mar 2014 05:39:57 GMT
Github user mateiz commented on a diff in the pull request:

    https://github.com/apache/spark/pull/50#discussion_r10201195
  
    --- Diff: core/src/main/scala/org/apache/spark/CacheManager.scala ---
    @@ -71,10 +71,21 @@ private[spark] class CacheManager(blockManager: BlockManager) extends
Logging {
               val computedValues = rdd.computeOrReadCheckpoint(split, context)
               // Persist the result, so long as the task is not running locally
               if (context.runningLocally) { return computedValues }
    -          val elements = new ArrayBuffer[Any]
    -          elements ++= computedValues
    -          blockManager.put(key, elements, storageLevel, tellMaster = true)
    -          elements.iterator.asInstanceOf[Iterator[T]]
    +          if (storageLevel.useDisk && !storageLevel.useMemory) {
    --- End diff --
    
    This is not the only condition where we want to do this. For example we might also want
it for MEMORY_ONLY_SER, where the serialized data might fit in RAM but the ArrayBuffer of
raw objects might not. (Especially if you set spark.rdd.compress to compress the serialized
data.)


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message