Improve performance of InternalParquetRecordReader (1%)
- Ngôn ngữ chính
- Java
- Star
- 3.1k
- Fork
- 1.6k
- Merge trung bình
- 3 ngày 12 giờ
- Pull request đã merge (30 ngày)
- 33
Mô tả
### 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_
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
Hướng nghiên cứu
Bắt đầu tại parquet-hadoop/src/main/java/org/apache/parquet/hadoop/InternalParquetRecordReader.java, ở LongStream quanh dòng 323, sau đó xem xét dự án benchmark parquet-rowindexiterator được liên kết. So sánh cách lặp hiện tại của reader với phương pháp Long Iterator của benchmark; được xem là hoàn thành khi reader tránh được overhead LongStream đã được báo cáo mà vẫn giữ nguyên hành vi lặp theo chỉ mục hàng.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- java
- Lĩnh vực
- data-engineering, performance
- Loại issue
- Tính năng
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức phù hợp với người mới
- 55/100