Provide option to use on-heap buffers for Snappy compression/decompression
- 主要言語
- Java
- スター
- 3.1k
- フォーク
- 1.6k
- 平均マージ
- 3日 12時間
- マージ済み PR(30日)
- 33
説明
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.*
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
調査の方向性
parquet-hadoop/src/main/java/parquet/hadoop/codec/SnappyDecompressor.java から始めて、現在デコンプレッションバッファがどのように割り当てられているかを確認します。フラグによって on-heap バッファを選択する方法を定義し、その後、Snappy のデコンプレッションが引き続き動作すること、また選択したモードによって報告された off-heap 割り当ての増加が回避されることを検証します。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- java
- 領域
- data-engineering
- issue の種類
- 機能追加
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 35/100