yihua commented on code in PR #20309:
URL: https://github.com/apache/hudi/pull/20309#discussion_r4267245722
##########
hudi-io/src/main/java/org/apache/hudi/io/hfile/HFileCursor.java:
##########
@@ -34,7 +34,8 @@ public class HFileCursor {
private static final int INVALID_POSITION = -1;
- private int offset;
+ // Absolute position in the HFile, which can exceed Integer.MAX_VALUE for
files larger than 2GB
Review Comment:
Addressed in #20321: the comment now describes the offset as the block start
plus the position within the uncompressed block.
##########
hudi-io/src/main/java/org/apache/hudi/io/hfile/HFileDataBlock.java:
##########
@@ -93,8 +93,8 @@ static HFileDataBlock createDataBlockToWrite(HFileContext
context,
* of the data block; the cursor points to the actual first key of the data
block which is
* lexicographically greater than the lookup key.
*/
- int seekTo(HFileCursor cursor, Key key, int blockStartOffsetInFile) {
- int relativeOffset = cursor.getOffset() - blockStartOffsetInFile;
+ int seekTo(HFileCursor cursor, Key key, long blockStartOffsetInFile) {
+ int relativeOffset = (int) (cursor.getOffset() - blockStartOffsetInFile);
Review Comment:
Addressed in #20321 with a comment on both narrowing casts, and the reader
and writer now reject block sizes the format cannot represent.
--
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]