Github user tdas commented on a diff in the pull request: https://github.com/apache/spark/pull/2765#discussion_r31466854 --- Diff: streaming/src/main/scala/org/apache/spark/streaming/dstream/FileInputDStream.scala --- @@ -223,6 +266,11 @@ class FileInputDStream[K, V, F <: NewInputFormat[K,V]]( */ private def isNewFile(path: Path, currentTime: Long, modTimeIgnoreThreshold: Long): Boolean = { val pathStr = path.toString + // Reject file if it start with _ + if (path.getName().startsWith("_")) { --- End diff -- Its good to be consistent with the core, however, I am worried that if we add another filter, it will silently break existing workloads that may be using files that start with "_" On Mon, Jun 1, 2015 at 7:25 AM, Shixiong Zhu <notificati...@github.com> wrote: > In > streaming/src/main/scala/org/apache/spark/streaming/dstream/FileInputDStream.scala > <https://github.com/apache/spark/pull/2765#discussion_r31429608>: > > > @@ -223,6 +266,11 @@ class FileInputDStream[K, V, F <: NewInputFormat[K,V]]( > > */ > > private def isNewFile(path: Path, currentTime: Long, modTimeIgnoreThreshold: Long): Boolean = { > > val pathStr = path.toString > > + // Reject file if it start with _ > > + if (path.getName().startsWith("_")) { > > Could you add this filter to FileInputDStream.defaultFilter? > > @tdas <https://github.com/tdas> is it a bug that > FileInputDStream.defaultFilter only ignores files that start with .? > Hadoop uses the following path filter (FileInputFormat.hiddenFileFilter): > > private static final PathFilter hiddenFileFilter = new PathFilter() { > public boolean accept(Path p) { > String name = p.getName(); > return !name.startsWith("_") && !name.startsWith("."); > } > }; > > Since SparkContext.textFile uses TextInputFormat, it uses this filter and > ignores files that start with "-" or ".". Should Streaming be consistent > with Core? > > â > Reply to this email directly or view it on GitHub > <https://github.com/apache/spark/pull/2765/files#r31429608>. >
--- 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