apache / apache/parquet-java

Support lazy materialization of row groups in ParquetFileReader

Aperta
#2,884 3 commenti 0 reazioni 0 assegnatari Vedi su GitHub
Component: Parquet Priority: Major Type: enhancement
Lingua principale
Java
Stelle
3.1k
Fork
1.6k
Merge medio
3g 12h
PR unite (30g)
33

Descrizione

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.*

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Direzione di ricerca

Inizia da ParquetFileReader#readAllPages in parquet-hadoop e dal comportamento di ColumnChunkPageReader descritto nella proposta; esamina Pull Request #1293 per il lavoro già esistente. Il lavoro è completato quando un'opzione di configurazione Parquet supporta la materializzazione lazy delle pagine dei row group, mantenendo il comportamento eager esistente quando è disabilitata.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
java
Ambito
data-engineering
Tipo di issue
Funzionalità
Difficoltà
5/5
Tempo stimato
Più di una settimana
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
25/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.