Github user tdas commented on a diff in the pull request:
https://github.com/apache/spark/pull/3419#discussion_r20776373
--- Diff:
streaming/src/main/scala/org/apache/spark/streaming/dstream/FileInputDStream.scala
---
@@ -193,57 +306,25 @@ class FileInputDStream[K: ClassTag, V: ClassTag, F <:
NewInputFormat[K,V] : Clas
hadoopFiles.map(p => (p._1, p._2.mkString(", "))).mkString("\n") +
"\n]"
}
}
+}
+
+private[streaming]
+object FileInputDStream {
/**
- * Custom PathFilter class to find new files that
- * ... have modification time more than ignore time
- * ... have not been seen in the last interval
- * ... have modification time less than maxModTime
+ * Minimum duration of remembering the information of selected files.
Files with mod times
+ * older than this "window" of remembering will be ignored. So if new
files are visible
+ * within this window, then the file will get selected in the next batch.
*/
- private[streaming]
- class CustomPathFilter(maxModTime: Long) extends PathFilter {
+ private val REMEMBER_DURATION = Minutes(1)
--- End diff --
Haha, I think have it as MIN_REMEMBER_DURATION in the previous version of
this PR. Will change it.
---
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]