Github user jerryshao commented on the pull request: https://github.com/apache/spark/pull/2765#issuecomment-58890751 Hi @wangxiaojing ï¼a small suggestion, why not making this improvement more flexible by adding a parameter to control the searching depth of directories, this will be more general than the current 1-depth searching implementation. Like: ```scala class FileInputDStream[K: ClassTag, V: ClassTag, F <: NewInputFormat[K,V] : ClassTag]( @transient ssc_ : StreamingContext, directory: String, filter: Path => Boolean = FileInputDStream.defaultFilter, depth: Int = 1, newFilesOnly: Boolean = true) ``` People can use this parameter to control the searching depth, default 1 keeps the same semantics as current code. Besides some while space related code styles should be changed to align with Scala style.
--- 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