avro
avro copied to clipboard
AVRO-3594: FsInput to use openFile() API
Boost performance reading from object stores in hadoop 3.3.0+ by using the openFile builder API and passing in the file length as an option (can save a HEAD) and asks for adaptive IO (sequential going to random if the client starts seeking)
saving that HEAD request is a key benefit against s3 as it can save 50-100 mS per file.
Jira
- [X] My PR addresses the following Avro Jira issues and references them in the PR title. For example, "AVRO-1234: My Avro PR"
- https://issues.apache.org/jira/browse/AVRO-XXX
- In case you are adding a dependency, check if the license complies with the ASF 3rd Party License Policy.
Tests
- [X] My PR does not need testing for this extremely good reason:
- All existing local file IO tests act as regression tests.
- avro isn't set up for integration tests with abfs/gs/s3a urls.
- mocking doesn't really do much here.
Integration tests would be the way to do this, but the foundational set up to do this is pretty complex. My cloudstream project downstream of spark is set up to do this.
Commits
- [X] My commits all reference Jira issues in their subject lines. In addition, my commits follow the guidelines from "How to write a good git commit message":
- Subject is separated from body by a blank line
- Subject is limited to 50 characters (not including Jira issue reference)
- Subject does not end with a period
- Subject uses the imperative mood ("add", not "adding")
- Body wraps at 72 characters
- Body explains "what" and "why", not "how"
Documentation
- [X] In case of new functionality, my PR adds documentation that describes how to use it.
- All the public functions and the classes in the PR contain Javadoc that explain what it does
no new docs
except that hadoop-2 profile still exists, doesn't it? which means that even though hadoop 3 profile is full of features, the 2.x one blocks things from working
@clesaec this can't go in until hadoop2 is cut as a profile.
I am actually doing a shim library to do reflection invocation on the newer operations, with fallbacks if not found. https://github.com/steveloughran/fs-api-shim
but even so, the sooner avro goes to recent hadoop 3.x release only the better.