Github user tdas commented on a diff in the pull request:
https://github.com/apache/spark/pull/9373#discussion_r43949361
--- Diff:
streaming/src/test/scala/org/apache/spark/streaming/ReceivedBlockTrackerSuite.scala
---
@@ -207,6 +207,87 @@ class ReceivedBlockTrackerSuite
tracker1.isWriteAheadLogEnabled should be (false)
}
+ test("parallel file deletion in FileBasedWriteAheadLog is robust to
deletion error") {
+ val manualClock = new ManualClock
+ conf.set("spark.streaming.driver.writeAheadLog.rollingIntervalSecs",
"1")
+ require(WriteAheadLogUtils.getRollingIntervalSecs(conf, isDriver =
true) === 1)
+ val tracker = createTracker(clock = manualClock)
+
+ val addBlocks = generateBlockInfos()
+ val batch1 = addBlocks.slice(0, 1)
+ val batch2 = addBlocks.slice(1, 3)
+ val batch3 = addBlocks.slice(3, 6)
+
+ def advanceTime(): Unit = manualClock.advance(1000)
+
+ assert(getWriteAheadLogFiles().length === 0)
+
--- End diff --
Can you added inline comments to explain each step, so that the reader can
understand whats going on.
---
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]