apache / apache/iceberg

Core: Improve HadoopFileIO performance when working with cloud storage

Open
#15,353 3 comments 0 reactions 0 assignees View on GitHub
improvement
Dominant language
Java
Stars
9.2k
Forks
3.5k
Avg merge
2d 16h
Merged PRs (30d)
129

Description

### Feature Request / Improvement

The class HadoopFileIO uses the hadoop 2.x APIs for opening and creating files. By moving to the newer createFile/openFile APIs and passing in information, it should be possible to

* Eliminate head requests when opening files (s3a, abfs)
* Switch the cloud connector to an optimal read policy for the known file type (random, sequential,..) (s3a, gcs)
* Have the s3a connector skip checks that creating a file won't overwrite a directory. This is consistent with S3OutputFile and relies on iceberg creating unique filenames, or at least not creating files above other objects.

There are some other minor tunings.

Constraints
1. All of this shall use APIs in Hadoop 3.3.5 so there's no need to use reflection for spark 3.4+ use.
2. There shall not be any adverse consequences when running against hdfs or local fs.

### Query engine

None

### Willingness to contribute

- [x] I can contribute this improvement/feature independently
- [ ] I would be willing to contribute this improvement/feature with guidance from the Iceberg community
- [ ] I cannot contribute this improvement/feature at this time

Contributor guide

Open the contributing guide

Research direction

Start with the HadoopFileIO class and the Hadoop 3.3.5 createFile/openFile APIs. Trace how files are opened and created for s3a, abfs, gcs, HDFS, and local filesystems, then verify that the changes avoid unnecessary requests and preserve HDFS and local filesystem behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
cloud, data-engineering
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.