Github user eyalfa commented on a diff in the pull request:

    https://github.com/apache/spark/pull/18855#discussion_r131912438
  
    --- Diff: 
core/src/test/scala/org/apache/spark/storage/BlockManagerSuite.scala ---
    @@ -1415,6 +1415,79 @@ class BlockManagerSuite extends SparkFunSuite with 
Matchers with BeforeAndAfterE
           super.fetchBlockSync(host, port, execId, blockId)
         }
       }
    +
    +  def testGetOrElseUpdateForLargeBlock(storageLevel : StorageLevel) {
    +    store = makeBlockManager(6L * 1024 * 1024 * 1024, "exec1")
    +    def mkBlobs() = {
    +      val rng = new java.util.Random(42)
    +      val buff = new Array[Byte](1024 * 1024)
    +      rng.nextBytes(buff)
    +      Iterator.fill(2 * 1024 + 1) {
    +        buff
    +      }
    +    }
    +    val res1 = store.getOrElseUpdate(
    +      RDDBlockId(42, 0),
    +      storageLevel,
    +      implicitly[ClassTag[Array[Byte]]],
    +      mkBlobs _
    +    )
    +    withClue(res1) {
    --- End diff --
    
    I think it'd print an Either where left side is a case class with members: 
iterator (prints as empty/non empty iterator), an enum and number of bytes. 
    right side is an iterator, again this'd print an empty/not-empty iterator.


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

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

Reply via email to