Github user taoli91 commented on a diff in the pull request:
https://github.com/apache/spark/pull/12693#discussion_r61045541
--- Diff:
streaming/src/test/scala/org/apache/spark/streaming/CheckpointSuite.scala ---
@@ -644,8 +644,10 @@ class CheckpointSuite extends TestSuiteBase with
DStreamCheckpointTester
val mappedStream = fileStream.map(s => {
val i = s.toInt
if (i == 3) {
- while (CheckpointSuite.batchThreeShouldBlockIndefinitely) {
- Thread.sleep(Long.MaxValue)
+ if (CheckpointSuite.batchThreeShouldBlockIndefinitely) {
+ // It's not a good idea to let the thread run forever
+ // as resource won't be correctly released
+ Thread.sleep(6000)
--- End diff --
@srowen It's a bit hacky here, but I can't find a good way. The problem
here is that, if the Task here waits indefinitely, and the `reader` in the
`NewHadoopRDD` will never get a chance to close. And the file handle held by it
cannot be deleted by windows.
---
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]