[ https://issues.apache.org/jira/browse/SPARK-17159?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15428677#comment-15428677 ]
Steve Loughran commented on SPARK-17159: ---------------------------------------- # the most minimal change is to get rid of that directoryFilter and just do it as a filter on the returned list of generated FileStatus entries. Against s3a, That will eliminate 1-4 HTTP calls per path which matches the pattern. It will mean a larger array of FileStatus entries are returned, but otherwise has # it *may* be possible to go further and have the glob also pickup all files underneath. That may or may not provide a speedup. # The listStatus() operatin can be speeded up by having its file filter executed after the run (and so there being an existing filestatus entry: no need to go near the FS to get the modification time > Improve FileInputDStream.findNewFiles list performance > ------------------------------------------------------ > > Key: SPARK-17159 > URL: https://issues.apache.org/jira/browse/SPARK-17159 > Project: Spark > Issue Type: Improvement > Components: Streaming > Affects Versions: 2.0.0 > Environment: spark against object stores > Reporter: Steve Loughran > Priority: Minor > > {{FileInputDStream.findNewFiles()}} is doing a globStatus with a fitler that > calls getFileStatus() on every file, takes the output and does listStatus() > on the output. > This going to suffer on object stores, as dir listing and getFileStatus calls > are so expensive. It's clear this is a problem, as the method has code to > detect timeouts in the window and warn of problems. > It should be possible to make this faster -- This message was sent by Atlassian JIRA (v6.3.4#6332) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org For additional commands, e-mail: issues-h...@spark.apache.org