You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Chao Sun (Jira)" <ji...@apache.org> on 2020/10/13 16:21:00 UTC

[jira] [Created] (SPARK-33135) Use listLocatedStatus from FileSystem implementations

Chao Sun created SPARK-33135:
--------------------------------

             Summary: Use listLocatedStatus from FileSystem implementations
                 Key: SPARK-33135
                 URL: https://issues.apache.org/jira/browse/SPARK-33135
             Project: Spark
          Issue Type: Improvement
          Components: Spark Core
    Affects Versions: 3.0.1
            Reporter: Chao Sun


{{HadoopFsUtils.parallelListLeafFiles}} currently only calls {{listLocatedStatus}} when the {{FileSystem}} impl is {{DistributedFileSystem}} or {{ViewFileSystem}}. For other types of {{FileSystem}}, it calls {{listStatus}} and then subsequently calls {{getFileBlockLocations}} on all the result {{FileStatus}}es.

In Hadoop client, {{listLocatedStatus}} is a well-defined API and in fact it is often overridden by specific file system implementations, such as S3A. The default {{listLocatedStatus}} also has similar behavior as it's done in Spark.

Therefore, instead of re-implement the logic in Spark itself, it's better to rely on the {{FileSystem}}-specific implementation for {{listLocatedStatus}}, which could include its own optimizations in the code path.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org