You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by "davecromberge (via GitHub)" <gi...@apache.org> on 2026/06/26 09:05:58 UTC
[PR] Add ranged-read support to PinotFS [pinot]
davecromberge opened a new pull request, #18861:
URL: https://github.com/apache/pinot/pull/18861
**Description**
Adds an additive ranged-read capability to the PinotFS SPI so callers can read a specific byte range of a file without downloading the whole object.
- New default methods openForRead(URI uri, long offset, long length) and supportsRangedRead() on PinotFS. Defaults throw UnsupportedOperationException / return false, so all existing
implementations remain source- and binary-compatible — no behavior change unless an implementation opts in.
- LocalPinotFS: implemented via RandomAccessFile + a bounded stream that releases the file handle on close.
- GcsPinotFS: implemented via ReadChannel.seek/limit (a single ranged GET, truncated at EOF).
**Motivation**
Enables targeted reads of file regions (e.g. Parquet footers and column chunks) for engines/plugins that query columnar data in place, avoiding full-object transfers.
**Testing**
LocalPinotFSTest covers mid-range, from-start, EOF truncation, zero-length, whole-file, and invalid-argument cases (runs in CI). GcsPinotFSTest adds a ranged-read case (credentials-gated, consistent with the existing GCS integration test).
**PR Tags**
1. `feature`
2. `performance`
**release-notes**:
- Signature changes to public methods/interfaces
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org
Re: [PR] Add ranged-read support to PinotFS [pinot]
Posted by "codecov-commenter (via GitHub)" <gi...@apache.org>.
codecov-commenter commented on PR #18861:
URL: https://github.com/apache/pinot/pull/18861#issuecomment-4808614615
## [Codecov](https://app.codecov.io/gh/apache/pinot/pull/18861?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
:x: Patch coverage is `0%` with `27 lines` in your changes missing coverage. Please review.
:white_check_mark: Project coverage is 37.15%. Comparing base ([`a9b5207`](https://app.codecov.io/gh/apache/pinot/commit/a9b5207a6326548f84e5d129c7597583cc1ddda9?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)) to head ([`19eb9a1`](https://app.codecov.io/gh/apache/pinot/commit/19eb9a1105cfa7d96092b253498c3ee99c9a9560?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
:warning: Report is 1 commits behind head on master.
| [Files with missing lines](https://app.codecov.io/gh/apache/pinot/pull/18861?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Patch % | Lines |
|---|---|---|
| [.../org/apache/pinot/spi/filesystem/LocalPinotFS.java](https://app.codecov.io/gh/apache/pinot/pull/18861?src=pr&el=tree&filepath=pinot-spi%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fpinot%2Fspi%2Ffilesystem%2FLocalPinotFS.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-cGlub3Qtc3BpL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9waW5vdC9zcGkvZmlsZXN5c3RlbS9Mb2NhbFBpbm90RlMuamF2YQ==) | 0.00% | [25 Missing :warning: ](https://app.codecov.io/gh/apache/pinot/pull/18861?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
| [.../java/org/apache/pinot/spi/filesystem/PinotFS.java](https://app.codecov.io/gh/apache/pinot/pull/18861?src=pr&el=tree&filepath=pinot-spi%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fpinot%2Fspi%2Ffilesystem%2FPinotFS.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-cGlub3Qtc3BpL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9waW5vdC9zcGkvZmlsZXN5c3RlbS9QaW5vdEZTLmphdmE=) | 0.00% | [2 Missing :warning: ](https://app.codecov.io/gh/apache/pinot/pull/18861?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
> :exclamation: There is a different number of reports uploaded between BASE (a9b5207) and HEAD (19eb9a1). Click for more details.
>
> <details><summary>HEAD has 12 uploads less than BASE</summary>
>
>| Flag | BASE (a9b5207) | HEAD (19eb9a1) |
>|------|------|------|
>|java-21|4|1|
>|unittests1|1|0|
>|unittests|2|1|
>|temurin|4|1|
>|integration|2|0|
>|integration1|1|0|
>|custom-integration1|1|0|
></details>
<details><summary>Additional details and impacted files</summary>
```diff
@@ Coverage Diff @@
## master #18861 +/- ##
=============================================
- Coverage 64.79% 37.15% -27.64%
+ Complexity 1322 1315 -7
=============================================
Files 3393 3393
Lines 211265 211292 +27
Branches 33212 33216 +4
=============================================
- Hits 136896 78513 -58383
- Misses 63320 125576 +62256
+ Partials 11049 7203 -3846
```
| [Flag](https://app.codecov.io/gh/apache/pinot/pull/18861/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Δ | |
|---|---|---|
| [custom-integration1](https://app.codecov.io/gh/apache/pinot/pull/18861/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
| [integration](https://app.codecov.io/gh/apache/pinot/pull/18861/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
| [integration1](https://app.codecov.io/gh/apache/pinot/pull/18861/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
| [java-21](https://app.codecov.io/gh/apache/pinot/pull/18861/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `37.15% <0.00%> (-27.64%)` | :arrow_down: |
| [temurin](https://app.codecov.io/gh/apache/pinot/pull/18861/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `37.15% <0.00%> (-27.64%)` | :arrow_down: |
| [unittests](https://app.codecov.io/gh/apache/pinot/pull/18861/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `37.15% <0.00%> (-27.64%)` | :arrow_down: |
| [unittests1](https://app.codecov.io/gh/apache/pinot/pull/18861/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
| [unittests2](https://app.codecov.io/gh/apache/pinot/pull/18861/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `37.15% <0.00%> (+<0.01%)` | :arrow_up: |
Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#carryforward-flags-in-the-pull-request-comment) to find out more.
</details>
[:umbrella: View full report in Codecov by Harness](https://app.codecov.io/gh/apache/pinot/pull/18861?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
:loudspeaker: Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
<details><summary> :rocket: New features to boost your workflow: </summary>
- :package: [JS Bundle Analysis](https://docs.codecov.com/docs/javascript-bundle-analysis): Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
</details>
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org
Re: [PR] Add ranged-read support to PinotFS [pinot]
Posted by "xiangfu0 (via GitHub)" <gi...@apache.org>.
xiangfu0 commented on code in PR #18861:
URL: https://github.com/apache/pinot/pull/18861#discussion_r3498628842
##########
pinot-plugins/pinot-file-system/pinot-gcs/src/main/java/org/apache/pinot/plugin/filesystem/GcsPinotFS.java:
##########
@@ -390,6 +391,31 @@ public InputStream open(URI uri)
}
}
+ @Override
+ public InputStream openForRead(URI uri, long offset, long length)
+ throws IOException {
+ if (offset < 0 || length < 0) {
+ throw new IllegalArgumentException(
+ "offset and length must be non-negative, got offset=" + offset + ", length=" + length);
+ }
+ try {
+ Blob blob = getBlob(new GcsUri(uri));
+ // ReadChannel.limit is the absolute, exclusive end position; seek positions the start. This issues a
+ // ranged GET so only [offset, offset + length) is transferred (truncated at end-of-file).
+ ReadChannel reader = blob.reader();
Review Comment:
`getBlob()` can return `null` for a missing object in this class, but unlike `open()` this path never checks that before calling `blob.reader()`. A ranged read against a missing GCS object will therefore fail with `NullPointerException` instead of the new SPI's `IOException`/`FileNotFoundException` contract. Please mirror the null check from `open()` here and add a missing-object regression test.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org