yihua commented on code in PR #12866:
URL: https://github.com/apache/hudi/pull/12866#discussion_r2106128302
##########
hudi-io/src/main/java/org/apache/hudi/io/hfile/HFileBlock.java:
##########
@@ -68,43 +75,37 @@ static class Header {
}
protected final HFileContext context;
- protected final byte[] byteBuff;
- protected final int startOffsetInBuff;
- protected final int sizeCheckSum;
- protected final int uncompressedEndOffset;
+ protected final Option<HFileBlockReadAttributes> readAttributesOpt;
private final HFileBlockType blockType;
- protected final int onDiskSizeWithoutHeader;
- protected final int uncompressedSizeWithoutHeader;
- protected final int bytesPerChecksum;
- private boolean isUnpacked = false;
- protected byte[] compressedByteBuff;
- protected int startOffsetInCompressedBuff;
+ // Write properties
+ protected long startOffsetInBuff = -1;
+ protected long previousBlockOffset = -1;
+ protected int blockSize;
Review Comment:
Fixed.
##########
hudi-io/src/main/java/org/apache/hudi/io/hfile/HFileDataBlock.java:
##########
@@ -135,18 +151,76 @@ public KeyValue readKeyValue(int offset) {
* HFile.
* @return {@code true} if there is next {@link KeyValue}; {code false}
otherwise.
*/
- public boolean next(HFileCursor cursor, int blockStartOffsetInFile) {
+ boolean next(HFileCursor cursor, int blockStartOffsetInFile) {
int offset = cursor.getOffset() - blockStartOffsetInFile;
Option<KeyValue> keyValue = cursor.getKeyValue();
if (!keyValue.isPresent()) {
keyValue = Option.of(readKeyValue(offset));
}
cursor.increment((long) KEY_OFFSET + (long) keyValue.get().getKeyLength()
- + (long) keyValue.get().getValueLength() +
ZERO_TS_VERSION_BYTE_LENGTH);
+ + keyValue.get().getValueLength() + ZERO_TS_VERSION_BYTE_LENGTH);
Review Comment:
Fixed.
--
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]