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

    https://github.com/apache/spark/pull/10934#discussion_r50933818
  
    --- Diff: 
streaming/src/test/scala/org/apache/spark/streaming/CheckpointSuite.scala ---
    @@ -821,6 +821,33 @@ class CheckpointSuite extends TestSuiteBase with 
DStreamCheckpointTester
         checkpointWriter.stop()
       }
     
    +  test("SPARK-6847: stack overflow when updateStateByKey is followed by a 
checkpointed dstream") {
    +    ssc = new StreamingContext(master, framework, batchDuration)
    +    val batchCounter = new BatchCounter(ssc)
    +    ssc.checkpoint(checkpointDir)
    +    val inputDStream = new CheckpointInputDStream(ssc)
    +    val updateFunc = (values: Seq[Int], state: Option[Int]) => {
    +      Some(values.sum + state.getOrElse(0))
    +    }
    +    @volatile var recursiveCheckpoint = false
    +    @volatile var rddsBothCheckpointed = false
    +    inputDStream.map(i => (i, i)).
    +      updateStateByKey[Int](updateFunc).checkpoint(batchDuration).
    +      map(i => i).checkpoint(batchDuration).
    --- End diff --
    
    would you test this using two updateStateByKey
    
    also this code style is weird and hard to read.


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