Support lazy materialization of row groups in ParquetFileReader
- Vorherrschende Sprache
- Java
- Sterne
- 3.1k
- Forks
- 1.6k
- Ø Merge
- 3 T. 12 Std.
- Gemergte PRs (30 T.)
- 33
Beschreibung
Motivation: The current behavior of ParquetFilterReader#readNextRowGroup is to eagerly enumerate all chunks in the row group, then read all pages in the chunk. For distributed data workloads, this can cause significant memory pressure, particularly for use cases that require the colocation of multiple Parquet files on a single worker.
Proposal: A Parquet Configuration option that enables lazy row group reading, i.e., only a page at a time (plus whatever header is necessary to read that header). The Configuration option could be either a flag, or an int value for how many pages/page bytes to buffer at a time.
I think this could be accomplished by modifying [ParquetFileReader#readAllPages](https://github.com/apache/parquet-mr/blob/cf294a35ca4b635f44357fe4c170f3b66870dc6e/parquet-hadoop/src/main/java/org/apache/parquet/hadoop/ParquetFileReader.java#L1727) to re-implement pagesInChunk as an Iterator, rather than a List. Then, ColumnChunkPageReader could parse the Configuration option above and decide whether to fully materialize the iterator or not.
I'm happy to try to create a draft/branch for this to get some early feedback on the idea!
**Reporter**: [Claire McGinty](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=clairemcginty) / @clairemcginty
#### PRs and other links:
- [GitHub Pull Request #1293](https://github.com/apache/parquet-mr/pull/1293)
**Note**: *This issue was originally created as [PARQUET-2443](https://issues.apache.org/jira/browse/PARQUET-2443). Please see the [migration documentation](https://issues.apache.org/jira/browse/PARQUET-2502) for further details.*
Beitragsleitfaden
Für dieses Repository ist kein Beitragsleitfaden indexiert
Rechercherichtung
Beginne mit ParquetFileReader#readAllPages in parquet-hadoop und dem im Vorschlag beschriebenen Verhalten von ColumnChunkPageReader; prüfe Pull Request #1293 auf bereits vorhandene Arbeiten. Als abgeschlossen gilt die Aufgabe, wenn eine Parquet-Konfigurationsoption die verzögerte Materialisierung von Row-Group-Seiten unterstützt und bei Deaktivierung das bestehende eager Verhalten beibehält.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- java
- Bereich
- data-engineering
- Issue-Typ
- Feature
- Schwierigkeit
- 5/5
- Geschätzter Aufwand
- Über eine Woche
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 25/100