Github user rajat-agarwal commented on a diff in the pull request:

    https://github.com/apache/spark/pull/537#discussion_r14324514
  
    --- Diff: 
streaming/src/main/scala/org/apache/spark/streaming/dstream/FileInputDStream.scala
 ---
    @@ -104,7 +122,14 @@ class FileInputDStream[K: ClassTag, V: ClassTag, F <: 
NewInputFormat[K,V] : Clas
         logDebug("Trying to get new files for time " + currentTime)
         lastNewFileFindingTime = System.currentTimeMillis
         val filter = new CustomPathFilter(currentTime)
    -    val newFiles = fs.listStatus(directoryPath, 
filter).map(_.getPath.toString)
    +
    +    val filePaths: Array[Path] = if (recursive) 
    +      recursiveFileList(fs.listStatus(directoryPath).toList).toArray
    --- End diff --
    
    If the input directory is already the lowest level of directory then it 
will not consider any files in it.
    example: 
    Consider the following directory.
    /a/file1.txt
    /a/file2.txt and so on .
    If the input directory is given as "/a", there will be no output.


---
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.
---

Reply via email to