www-infrastructure-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kellrott <...@git.apache.org>
Subject [GitHub] incubator-spark pull request: Patch for SPARK-942
Date Tue, 25 Feb 2014 06:34:55 GMT
Github user kellrott commented on a diff in the pull request:

    --- Diff: core/src/main/scala/org/apache/spark/storage/BlockManager.scala ---
    @@ -360,7 +360,7 @@ private[spark] class BlockManager(
                     // TODO: Consider creating a putValues that also takes in a iterator?
                     val valuesBuffer = new ArrayBuffer[Any]
                     valuesBuffer ++= values
    -                memoryStore.putValues(blockId, valuesBuffer, level, true).data match
    +                memoryStore.putValues(blockId, valuesBuffer.toIterator, level, true).data
match {
    --- End diff --
    I think for that one, because it also returns the array a line later, you need to cache
the iterator to an actual fixed array before passing it to the memoryStore. Otherwise, the
memoryStore could consume a 'one-time' iterator and leave you with nothing. 

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.

View raw message