apache / apache/parquet-java

Parquet pages for different columns cannot be read in parallel

オープン
#2,358 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る
Component: Parquet Priority: Major Type: enhancement
主要言語
Java
スター
3.1k
フォーク
1.6k
平均マージ
3日 12時間
マージ済み PR(30日)
33

説明

All ColumnChunkPageReader instances use the same decompressor. 

```java

BytesInputDecompressor decompressor = options.getCodecFactory().getDecompressor(descriptor.metadata.getCodec());
return new ColumnChunkPageReader(decompressor, pagesInChunk, dictionaryPage);
```
The CodecFactory caches the decompressors for every codec type returning the same instance on every getCompressor(codecName) call. See the caching happening here:

```java

@Override
public BytesDecompressor getDecompressor(CompressionCodecName codecName) {
BytesDecompressor decomp = decompressors.get(codecName);
if (decomp == null){
decomp = createDecompressor(codecName); decompressors.put(codecName, decomp);
}
return decomp;
}
 
```
 

If multiple threads try to read the pages belonging to different columns, they run into thread

safety issues. This issue prevents increasing the throughput at which applications can read parquet data by parallelizing page reads. 

**Reporter**: [Samarth Jain](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=samarthjain) / @samarthjain
**Assignee**: [Samarth Jain](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=samarthjain) / @samarthjain
#### PRs and other links:
- [GitHub Pull Request #668](https://github.com/apache/parquet-mr/pull/668)
- [GitHub Pull Request #670](https://github.com/apache/parquet-mr/pull/670)

**Note**: *This issue was originally created as [PARQUET-1641](https://issues.apache.org/jira/browse/PARQUET-1641). Please see the [migration documentation](https://issues.apache.org/jira/browse/PARQUET-2502) for further details.*

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

調査の方向性

ParquetFileReader.java の 1286 行付近と CodecFactory.java の 197 行付近から始め、ColumnChunkPageReader インスタンス間でデコンプレッサーがどのように共有されているかを追跡してください。開始前に pull request #668 と #670 を確認し、その後、報告されたスレッドセーフ性の問題なしに、異なる列のページ読み取りを並列に実行できることを検証してください。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
java
領域
data-engineering
issue の種類
バグ
難易度
4/5
見積もり時間
3〜5日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
20/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。