mukund-thakur commented on code in PR #999:
URL: https://github.com/apache/parquet-mr/pull/999#discussion_r1002002330
##########
parquet-hadoop/src/main/java/org/apache/parquet/hadoop/ParquetFileReader.java:
##########
@@ -1093,10 +1099,38 @@ private ColumnChunkPageReadStore
internalReadFilteredRowGroup(BlockMetaData bloc
}
}
}
- // actually read all the chunks
+ // Vectored IO up.
+
+ List<FileRange> ranges = new ArrayList<>();
for (ConsecutivePartList consecutiveChunks : allParts) {
- consecutiveChunks.readAll(f, builder);
+ ranges.add(FileRange.createFileRange(consecutiveChunks.offset, (int)
consecutiveChunks.length));
+ }
+ LOG.warn("Doing vectored IO for ranges {}", ranges);
+ f.readVectored(ranges, ByteBuffer::allocate);
Review Comment:
that would be great. thanks.
Also, I reran the same with changes in readAllVectored and I can see that it
breaks the big ranges into smaller ones if the size is greater than
maxAllocationSize ( default 8 MB). For exmaple see the breaking in
range[24928095,34504532]. note- this example is for query26.
So I guess changing in the above layer makes more sense.
> 2022-10-20 21:36:02,758 [WARN] [TezChild] |hadoop.ParquetFileReader|:
Doing vectored IO for ranges [range[5326394,7673015), range[24928095,34504532),
range[36603729,37991198), range[44105694,56402697), range[86874390,88752497)]
2022-10-20 21:36:03,146 [WARN] [TezChild] |hadoop.ParquetFileReader|:
Reading through the vectored API.[readAllVectored]
2022-10-20 21:36:03,147 [WARN] [TezChild] |hadoop.ParquetFileReader|: Doing
vectored IO for ranges [range[5326394,7673015)]
2022-10-20 21:36:03,225 [WARN] [TezChild] |hadoop.ParquetFileReader|:
Reading through the vectored API.[readAllVectored]
2022-10-20 21:36:03,225 [WARN] [TezChild] |hadoop.ParquetFileReader|: Doing
vectored IO for ranges [range[24928095,33316703), range[33316703,34504532)]
2022-10-20 21:36:03,352 [WARN] [TezChild] |hadoop.ParquetFileReader|:
Reading through the vectored API.[readAllVectored]
2022-10-20 21:36:03,352 [WARN] [TezChild] |hadoop.ParquetFileReader|: Doing
vectored IO for ranges [range[36603729,37991198)]
2022-10-20 21:36:03,439 [WARN] [TezChild] |hadoop.ParquetFileReader|:
Reading through the vectored API.[readAllVectored]
2022-10-20 21:36:03,439 [WARN] [TezChild] |hadoop.ParquetFileReader|: Doing
vectored IO for ranges [range[44105694,52494302), range[52494302,56402697)]
2022-10-20 21:36:03,652 [WARN] [TezChild] |hadoop.ParquetFileReader|:
Reading through the vectored API.[readAllVectored]
2022-10-20 21:36:03,652 [WARN] [TezChild] |hadoop.ParquetFileReader|: Doing
vectored IO for ranges [range[86874390,88752497)]
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]