apache / apache/parquet-java

Parquet pages for different columns cannot be read in parallel

Đang mở
#2,358 1 bình luận 0 reaction 0 người được giao Xem trên GitHub
Component: Parquet Priority: Major Type: enhancement
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ả

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.*

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.java quanh dòng 1286 và CodecFactory.java quanh dòng 197 để theo dõi cách các bộ giải nén được dùng chung giữa các instance của ColumnChunkPageReader. Hãy xem các pull request #668 và #670 trước khi bắt đầu, sau đó xác minh rằng việc đọc page của các cột khác nhau có thể chạy song song mà không gặp vấn đề an toàn luồng đã được báo cáo.

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
Lỗi
Độ khó
4/5
Thời gian dự kiến
3-5 ngày
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
20/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.