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

    https://github.com/apache/spark/pull/537#discussion_r14364724
  
    --- 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 --
    
    With below new implementation we can call this
    val filePaths: Array[Path] = if (recursive) 
            recursiveListDirs(List(fs.getFileStatus(new 
Path(directoryPath)))).toArray


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