Github user srowen commented on a diff in the pull request: https://github.com/apache/spark/pull/2765#discussion_r18740436 --- Diff: streaming/src/main/scala/org/apache/spark/streaming/dstream/FileInputDStream.scala --- @@ -240,6 +260,31 @@ class FileInputDStream[K: ClassTag, V: ClassTag, F <: NewInputFormat[K,V] : Clas true } } + + private[streaming] + class SubPathFilter extends PathFilter { + + def accept(path: Path): Boolean = { + try { + if(fs.getFileStatus(path).isDirectory()){ + val modTime = getFileModTime(path) + logDebug("Mod time for " + path + " is " + modTime) + if (modTime > ignoreTime) { + // Reject file if it was created before the ignore time (or, before last interval) + logDebug("Mod time " + modTime + " less than ignore time " + ignoreTime) + return false + } + return true + } + } catch { + case fnfe: java.io.FileNotFoundException => --- End diff -- Why not import this, and what about more general `IOException`?
--- 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 infrastruct...@apache.org or file a JIRA ticket with INFRA. --- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org