Github user tdas commented on a diff in the pull request:
https://github.com/apache/spark/pull/9805#discussion_r45249165
--- Diff:
streaming/src/test/scala/org/apache/spark/streaming/TrackStateByKeySuite.scala
---
@@ -436,6 +437,41 @@ class TrackStateByKeySuite extends SparkFunSuite with
BeforeAndAfterAll with Bef
assert(collectedStateSnapshots.last.toSet === Set(("a", 1)))
}
+ test("trackStateByKey - checkpoint durations") {
+ val privateMethod = PrivateMethod[InternalTrackStateDStream[_, _, _,
_]]('internalStream)
+
+ def testCheckpointDuration(
+ batchDuration: Duration,
+ expectedCheckpointDuration: Duration,
+ explicitCheckpointDuration: Option[Duration] = None
+ ): Unit = {
+ try {
+ ssc = new StreamingContext(sc, batchDuration)
--- End diff --
The absolute first one created in the `before {...}` is not started, so
there is nothing to stop. And the context start in the function will be stopped
by the finally.
---
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]