Github user tdas commented on a diff in the pull request:
https://github.com/apache/spark/pull/3687#discussion_r22265733
--- Diff:
streaming/src/main/scala/org/apache/spark/streaming/dstream/FileInputDStream.scala
---
@@ -74,12 +74,15 @@ class FileInputDStream[K: ClassTag, V: ClassTag, F <:
NewInputFormat[K,V] : Clas
newFilesOnly: Boolean = true)
extends InputDStream[(K, V)](ssc_) {
+ // This is a def so that it works during checkpoint recovery:
+ private def clock = ssc.scheduler.clock
+
// Data to be saved as part of the streaming checkpoints
protected[streaming] override val checkpointData = new
FileInputDStreamCheckpointData
// Initial ignore threshold based on which old, existing files in the
directory (at the time of
// starting the streaming application) will be ignored or considered
- private val initialModTimeIgnoreThreshold = if (newFilesOnly)
System.currentTimeMillis() else 0L
--- End diff --
I approve this change. But probably should be a different PR that just
touches this input stream and its tests.
---
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]