Github user steveloughran commented on the issue:

    https://github.com/apache/spark/pull/14731
  
    Actually, I've just noticed that DStream behaviour isn't in sync with the 
streaming programming guide, which says "files written in nested directories 
not supported)". That is: SPARK-14796 didn't patch the docs.
    
    it may as well be fixed in this patch. How about, in the bullet points 
underneath
    
    - Wildcards may be used to specify a set of directories to scan for new 
files, for example `hdfs://nn1:8050/users/alice/logs/2016-*/*.gz`
    -
    -New directories and their contents will be discovered as they arrive
    
    Special points for object stores
    - Wildcard lookup may be very slow with some object stores.
     - Directory rename is not atomic; if a directory is renamed into the 
streaming source, then the files within may only be discovered and process 
across a multiple streaming windows.
    - 
    
    + there's another optimisation; use the {{SparkHadoopUtils.isGlobPath()}} 
predicate to recognise when the dir path isn't a wildcard, in which case just 
do a simple listFiles()}}. Until that shortcutting is done automatically in the 
Hadoop FS implementation, spark can do it on its side. As the {{listFiles()}} 
call was what was used before SPARK-14796, it has to be compatible, else 
SPARK-14796 has broken things



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

Reply via email to