apache / apache/parquet-java

parquet-tools merge extremely slow with block-option

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

Descrizione

parquet-tools merge is extremely time- and memory-consuming when used with block-option.

 

The merge function builds a bigger file out of several smaller parquet-files. Used without the block-option it just concatenates the files into a bigger one without building larger row-groups. That doesn't help with query-performance-issues. With block-option, parquet-tools build bigger row-groups which improves the query-performance, but the merge-process itself is extremely slow and memory-consuming.

 

Consider a case in which you have many small parquet files, e.g. 1000 files with a size of 100kb. Merging them into one file fails on my machine because even 20GB of memory are not enough for the process (the total amount of data as well as the resulting file should be smaller than 100MB).

 

Different situation: Consider having 100 files of size 1MB. Then merging them is possible with 20GB of RAM, but it takes almoust half an hour to process, which is to much for many use-cases.

 

Is there any possibility to accelerate the merge and reduce the need of memory?

**Reporter**: [Alexander Gunkel](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=Checkito)

**Note**: *This issue was originally created as [PARQUET-1670](https://issues.apache.org/jira/browse/PARQUET-1670). 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

Partite dal punto di ingresso di merge di parquet-tools e riproducete i casi di block-option segnalati: 1,000 file da 100 KB e 100 file da 1 MB. Confrontate il tempo di esecuzione e la memoria con e senza block-option; il lavoro è completato quando il merge con block-option termina senza un uso eccessivo della memoria ed è sostanzialmente più veloce, mantenendo row-group più grandi.

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

Valutazione

Stack tecnologico
java
Ambito
cli, data-engineering
Tipo di issue
Bug
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.