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

    https://github.com/apache/spark/pull/9373#discussion_r44595545
  
    --- Diff: 
streaming/src/test/scala/org/apache/spark/streaming/util/WriteAheadLogSuite.scala
 ---
    @@ -582,6 +620,9 @@ object WriteAheadLogSuite {
           allowBatching: Boolean): Seq[String] = {
         val wal = createWriteAheadLog(logDirectory, closeFileAfterWrite, 
allowBatching)
         val data = wal.readAll().asScala.map(byteBufferToString).toSeq
    +    // The thread pool for parallel recovery gets killed with wal.close(). 
Therefore we need to
    +    // eagerly compute data, otherwise the lazy computation will fail.
    +    data.length
    --- End diff --
    
    Could you just change `toSeq` to `toArray`? `toArray` will drain the 
Iterator at once.


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

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to