Commit c69e922
authored
Enable optimized S3 tail reads for Iceberg Parquet footers (#15384)
### Description
Fixes #15363
Parquet footer reads through Iceberg currently open and seek an input
stream instead of using `RapidsInputFile.readTail`. This bypasses the
optimized Iceberg S3 suffix-range path and adds an avoidable length/seek
round trip.
This change:
- Reads the Parquet trailer with `RapidsInputFile.readTail` and the
footer body with `readVectored`.
- Makes `IcebergS3InputFile` an `IcebergInputFile` subclass backed by
the original `org.apache.iceberg.io.InputFile`, overriding only the
S3-specific vectored and tail reads.
- Routes decrypted Iceberg input files through `IcebergFileIO`,
preserving Iceberg decryption while enabling optimized S3 reads.
- Emits a debug message after a suffix-range tail read completes.
### Testing
- Spark 4.0.2 compilation passed for the Iceberg 1.10 and 1.11 modules:
`mvn -Dbuildver=402 -DskipTests -pl
iceberg/iceberg-1-10-x,iceberg/iceberg-1-11-x -am compile`
- Existing Parquet and Iceberg scan coverage includes
`ParquetScanSuite`, `ParquetFormatScanSuite`, and
`integration_tests/src/main/python/iceberg/iceberg_test.py`.
- An EMR GPU table scan completed successfully, and executor logs
confirmed that Iceberg `readTail` used an S3 suffix-range GET.
### Checklists
Documentation
- [ ] Updated for new or modified user-facing features or behaviors
- [x] No user-facing change
Testing
- [ ] Added or modified tests to cover new code paths
- [x] Covered by existing tests
- [ ] Not required
Performance
- [ ] Tests ran and results are added in the PR description
- [ ] Issue filed with a link in the PR description
- [x] Not required
---------
Signed-off-by: Ray Liu <liurenjie2008@gmail.com>1 parent 02754a5 commit c69e922
5 files changed
Lines changed: 29 additions & 76 deletions
File tree
- iceberg/common/src/main
- java
- com/nvidia/spark/rapids/fileio/iceberg
- org/apache/iceberg/aws/s3
- scala/org/apache/iceberg/spark/source
- sql-plugin/src/main/scala/com/nvidia/spark/rapids/parquet
Lines changed: 11 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
52 | | - | |
53 | | - | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
54 | 63 | | |
55 | 64 | | |
56 | 65 | | |
| |||
Lines changed: 11 additions & 37 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
26 | | - | |
27 | 26 | | |
28 | 27 | | |
29 | 28 | | |
| |||
33 | 32 | | |
34 | 33 | | |
35 | 34 | | |
36 | | - | |
37 | 35 | | |
38 | 36 | | |
39 | 37 | | |
40 | 38 | | |
41 | 39 | | |
42 | 40 | | |
43 | | - | |
| 41 | + | |
44 | 42 | | |
45 | 43 | | |
46 | | - | |
47 | 44 | | |
48 | 45 | | |
49 | 46 | | |
50 | 47 | | |
51 | 48 | | |
52 | | - | |
| 49 | + | |
53 | 50 | | |
54 | 51 | | |
55 | 52 | | |
56 | | - | |
| 53 | + | |
57 | 54 | | |
58 | 55 | | |
59 | 56 | | |
60 | 57 | | |
61 | 58 | | |
62 | | - | |
| 59 | + | |
63 | 60 | | |
64 | 61 | | |
65 | 62 | | |
| |||
86 | 83 | | |
87 | 84 | | |
88 | 85 | | |
89 | | - | |
90 | | - | |
91 | | - | |
92 | | - | |
93 | | - | |
94 | | - | |
95 | | - | |
96 | | - | |
97 | | - | |
98 | | - | |
99 | | - | |
100 | | - | |
101 | | - | |
102 | | - | |
103 | | - | |
104 | | - | |
105 | | - | |
106 | | - | |
107 | | - | |
108 | | - | |
109 | | - | |
110 | | - | |
111 | | - | |
112 | | - | |
113 | | - | |
114 | | - | |
115 | | - | |
116 | | - | |
117 | | - | |
118 | | - | |
| 86 | + | |
119 | 87 | | |
120 | 88 | | |
121 | 89 | | |
| |||
140 | 108 | | |
141 | 109 | | |
142 | 110 | | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
143 | 117 | | |
144 | 118 | | |
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
23 | | - | |
| 23 | + | |
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| |||
110 | 110 | | |
111 | 111 | | |
112 | 112 | | |
113 | | - | |
| 113 | + | |
114 | 114 | | |
115 | 115 | | |
116 | 116 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
570 | 570 | | |
571 | 571 | | |
572 | 572 | | |
573 | | - | |
| 573 | + | |
574 | 574 | | |
575 | 575 | | |
576 | 576 | | |
| |||
Lines changed: 4 additions & 34 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
23 | | - | |
24 | | - | |
| 23 | + | |
| 24 | + | |
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
28 | | - | |
29 | | - | |
30 | 28 | | |
31 | 29 | | |
32 | 30 | | |
| |||
80 | 78 | | |
81 | 79 | | |
82 | 80 | | |
83 | | - | |
84 | | - | |
85 | | - | |
86 | | - | |
87 | | - | |
88 | | - | |
89 | | - | |
90 | | - | |
91 | | - | |
92 | | - | |
93 | | - | |
94 | | - | |
95 | | - | |
96 | | - | |
97 | | - | |
98 | | - | |
99 | | - | |
100 | | - | |
101 | | - | |
102 | | - | |
103 | | - | |
104 | | - | |
105 | | - | |
106 | | - | |
107 | | - | |
108 | | - | |
109 | | - | |
110 | | - | |
111 | | - | |
112 | | - | |
| 81 | + | |
| 82 | + | |
113 | 83 | | |
114 | 84 | | |
115 | 85 | | |
| |||
0 commit comments