Support lazy materialization of row groups in ParquetFileReader
- 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ả
Motivation: The current behavior of ParquetFilterReader#readNextRowGroup is to eagerly enumerate all chunks in the row group, then read all pages in the chunk. For distributed data workloads, this can cause significant memory pressure, particularly for use cases that require the colocation of multiple Parquet files on a single worker.
Proposal: A Parquet Configuration option that enables lazy row group reading, i.e., only a page at a time (plus whatever header is necessary to read that header). The Configuration option could be either a flag, or an int value for how many pages/page bytes to buffer at a time.
I think this could be accomplished by modifying [ParquetFileReader#readAllPages](https://github.com/apache/parquet-mr/blob/cf294a35ca4b635f44357fe4c170f3b66870dc6e/parquet-hadoop/src/main/java/org/apache/parquet/hadoop/ParquetFileReader.java#L1727) to re-implement pagesInChunk as an Iterator, rather than a List. Then, ColumnChunkPageReader could parse the Configuration option above and decide whether to fully materialize the iterator or not.
I'm happy to try to create a draft/branch for this to get some early feedback on the idea!
**Reporter**: [Claire McGinty](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=clairemcginty) / @clairemcginty
#### PRs and other links:
- [GitHub Pull Request #1293](https://github.com/apache/parquet-mr/pull/1293)
**Note**: *This issue was originally created as [PARQUET-2443](https://issues.apache.org/jira/browse/PARQUET-2443). Please see the [migration documentation](https://issues.apache.org/jira/browse/PARQUET-2502) for further details.*
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 với ParquetFileReader#readAllPages trong parquet-hadoop và hành vi của ColumnChunkPageReader được mô tả trong đề xuất; xem lại Pull Request #1293 để tham khảo phần triển khai hiện có. Được xem là hoàn thành khi một tùy chọn cấu hình Parquet hỗ trợ materialization lazy của các page thuộc row group, đồng thời vẫn giữ nguyên hành vi eager hiện có khi tùy chọn này bị tắt.
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
- Loại issue
- Tính năng
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 25/100