apache / apache/parquet-java

Improve performance of InternalParquetRecordReader (1%)

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

説明

### Describe the enhancement requested

Profiling the load of a Parquet file with Java Mission Control, I've noticed that `InternalParquetRecordReader` [LongStream](https://github.com/apache/parquet-java/blob/1f1e07bbf750fba228851c2d63470c3da5726831/parquet-hadoop/src/main/java/org/apache/parquet/hadoop/InternalParquetRecordReader.java#L323) consumes relevant amount of time.

This `LongStream` can be replaced with a simpler Long Iterator that iterates from 0 to `pages.getRowCount()`.

To measure the overhead I've created a test project that overwrites `InternalParquetRecordReader` implementation with a Long Iterator: https://github.com/jerolba/parquet-rowindexiterator

The execution time is sensitive to the context of the JVM, but running the benchmark multiple times shows that LongStream is slower than LongIterator, between 1% and 4% depending on the run.

### Component(s)

_No response_

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

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

調査の方向性

parquet-hadoop/src/main/java/org/apache/parquet/hadoop/InternalParquetRecordReader.java の、323行目付近にある LongStream から始め、リンクされているベンチマークプロジェクト parquet-rowindexiterator を確認します。reader の現在の反復処理と、ベンチマークの Long Iterator アプローチを比較します。完了条件は、reader が報告されている LongStream のオーバーヘッドを回避しつつ、行インデックスの反復処理の動作を維持することです。

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

評価

技術スタック
java
領域
data-engineering, performance
issue の種類
機能追加
難易度
2/5
見積もり時間
1〜3時間
活発さ
停滞
明瞭さ
明確に書かれている
初心者へのやさしさ
55/100

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

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