should not use seek() for skipping very small column chunks. better to read and ignore data.
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 45/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- hadoop, java
- Lĩnh vực
- data-engineering
Hướng nghiên cứu
Bắt đầu tại org.apache.parquet.hadoop.ParquetFileReader#internalReadRowGroup và theo dõi cách ConsecutivePartList được xây dựng trước readAllPartsVectoredOrNormal. Sử dụng Hadoop FileSystem#minSeekForVectorReads làm ngưỡng để đánh giá các khoảng trống nhỏ, sau đó xác minh rằng các chunk cột đã chọn vẫn được tải, trong khi các khoảng trống nhỏ được đọc trong các phạm vi bao quanh thay vì gây ra các seek riêng biệt.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Describe the enhancement requested
When reading some column chunks but not all, parquet is building a list of "ConsecutivePartList", then trying to call the Hadoop api for vectorized reader of FSDataInputStream#readVectored(List ...)
Unfortunatly, many implementations of "FSDataInputStream" do not override the readVectored() method, which trigger many distinct calls to read.
For example on hadoop-azure, the Azure Datalake Storage is much slower at establishing a new Https connection (using infamous calls HttpURLConnection for jdk 1.0, then doing TLS hand-shake), that to get only few more megas of data on an existing socket !!
The case with small wholes to avoid reading is very frequent when having columns in parquet files that are not read, and are highly compressed because of RLE encoding. Typically, a very sparse column with only few values, or even always null within a page. Such a column could be encoded in only few hundred of bytes by parquet, so it is NOT a problem of reading 100 bytes more.
Parquet should at least honor the following method from hadoop class FileSystem, that says that a seek of less than 4096 bytes is NOT reasonable.
/**
* What is the smallest reasonable seek?
* @return the minimum number of bytes
*/
default int minSeekForVectorReads() {
return 4 * 1024;
}
The logic for building this List for a list of column chunks is here:
org.apache.parquet.hadoop.ParquetFileReader#internalReadRowGroup
private ColumnChunkPageReadStore internalReadRowGroup(int blockIndex) throws IOException {
...
for (ColumnChunkMetaData mc : block.getColumns()) {
...
// first part or not consecutive => new list
if (currentParts == null || currentParts.endPos() != startingPos) { // <===== SHOULD honor minSeekForVectorReads()
currentParts = new ConsecutivePartList(startingPos);
allParts.add(currentParts);
}
currentParts.addChunk(new ChunkDescriptor(columnDescriptor, mc, startingPos, mc.getTotalSize()));
}
}
// actually read all the chunks
ChunkListBuilder builder = new ChunkListBuilder(block.getRowCount());
readAllPartsVectoredOrNormal(allParts, builder);
rowGroup.setReleaser(builder.releaser);
for (Chunk chunk : builder.build()) {
readChunkPages(chunk, block, rowGroup);
}
return rowGroup;
}
maybe a possible implementation could be to add fictive "ConsecutivePartList" that are to be ignored while receiving the data, but that would avoid having some wholes in the ranges to read.
Component(s)
No response
- Ngôn ngữ chính
- Java
- Star
- 3.1k
- Fork
- 1.6k
- Merge trung bình
- 6 ngày 16 giờ
- Pull request đã merge (30 ngày)
- 36
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
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của apache/parquet-java
-
Type: bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
apache/parquet-java#3792 ·
-
Make PageReader AutoCloseable Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
apache/parquet-java#3767 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
apache/parquet-java#3695 · 1 bình luận ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
apache/parquet-java#3667 ·
-
Type: bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
apache/parquet-java#3587 ·
Tất cả issue của apache/parquet-java
Issue tương tự
-
documentation
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
inu-appcenter/memorIN-backend#288 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
-
frontend maui-pilot pilot-ask question
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
-
executions.Query — startDate and timeRange filters are sent with inverted comparison operators Đang mởarea/plugin
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
kestra-io/plugin-kestra#190 ·