Provide option to use on-heap buffers for Snappy compression/decompression
- Lingua principale
- Java
- Stelle
- 3.1k
- Fork
- 1.6k
- Merge medio
- 3g 12h
- PR unite (30g)
- 33
Descrizione
The current code uses direct off-heap buffers for decompression. If many decompressors are instantiated across multiple threads, and/or the objects being decompressed are large, this can lead to a huge amount of off-heap allocation by the JVM. This can be exacerbated if overall, there is not heap contention, since no GC will be performed to reclaim the space used by these buffers.
It would be nice if there was a flag we cold use to simply allocate on-heap buffers here:
https://github.com/apache/incubator-parquet-mr/blob/master/parquet-hadoop/src/main/java/parquet/hadoop/codec/SnappyDecompressor.java#L28
We ran into an issue today where these buffers totaled a very large amount of storage and caused our Java processes (running within containers) to be terminated by the kernel OOM-killer.
**Reporter**: [Patrick Wendell](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=pwendell)
#### Related issues:
- [Parquet+Snappy can cause significant off-heap memory usage](https://issues.apache.org/jira/browse/SPARK-4073) (breaks)
**Note**: *This issue was originally created as [PARQUET-118](https://issues.apache.org/jira/browse/PARQUET-118). 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 parquet-hadoop/src/main/java/parquet/hadoop/codec/SnappyDecompressor.java e verifica come vengono attualmente allocati i buffer di decompressione. Definisci come un flag debba selezionare buffer on-heap, quindi verifica che la decompressione Snappy continui a funzionare e che la modalità selezionata eviti la crescita segnalata delle allocazioni off-heap.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- java
- Ambito
- data-engineering
- Tipo di issue
- Funzionalità
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 35/100