Github user gaborgsomogyi commented on a diff in the pull request:
https://github.com/apache/spark/pull/21430#discussion_r191130212
--- Diff:
streaming/src/test/scala/org/apache/spark/streaming/ReceivedBlockTrackerSuite.scala
---
@@ -308,12 +354,16 @@ class ReceivedBlockTrackerSuite
* want to control time by manually incrementing it to test log clean.
*/
def createTracker(
+ createSpyTracker: Boolean = false,
setCheckpointDir: Boolean = true,
recoverFromWriteAheadLog: Boolean = false,
clock: Clock = new SystemClock): ReceivedBlockTracker = {
val cpDirOption = if (setCheckpointDir)
Some(checkpointDirectory.toString) else None
- val tracker = new ReceivedBlockTracker(
+ var tracker = new ReceivedBlockTracker(
conf, hadoopConf, Seq(streamId), clock, recoverFromWriteAheadLog,
cpDirOption)
+ if (createSpyTracker) {
+ tracker = spy(tracker)
--- End diff --
Changed.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]