spark-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From squito <...@git.apache.org>
Subject [GitHub] spark pull request: [SPARK-7214] Reserve space for unrolling even ...
Date Fri, 01 May 2015 00:44:20 GMT
Github user squito commented on a diff in the pull request:

    https://github.com/apache/spark/pull/5784#discussion_r29483609
  
    --- Diff: core/src/test/scala/org/apache/spark/storage/BlockManagerSuite.scala ---
    @@ -1225,6 +1225,72 @@ class BlockManagerSuite extends FunSuite with Matchers with BeforeAndAfterEach
         assert(unrollMemoryAfterB7 === unrollMemoryAfterB4)
       }
     
    +  /**
    +   * Make sure unrolling triggers block evictions when the initial unroll threshold is
not available
    +   * otherwise.
    +   */
    +  test("unroll when memory store nearly full") {
    +    store = makeBlockManager(12000)
    +    val memOnly = StorageLevel.MEMORY_ONLY
    +    val memoryStore = store.memoryStore
    +    // Should take up 1145 * 10 + object headers > 12000 - unrollMemoryThreshold (512)
    +    val mostList = List.fill(10)(new Array[Byte](1140))
    +    val smallList = List.fill(40)(new Array[Byte](100))
    +    val droppedBlocks = new ArrayBuffer[(BlockId, BlockStatus)]
    +    
    +    store.putIterator("most", mostList.iterator, memOnly)
    +    assert(memoryStore.contains("most"))
    +    
    +    var unrollResult = memoryStore.unrollSafely("small", smallList.iterator, droppedBlocks)
 
    --- End diff --
    
    this can be a `val`


---
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.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


Mime
View raw message