linliu-code commented on code in PR #12866:
URL: https://github.com/apache/hudi/pull/12866#discussion_r2105903766
##########
hudi-io/src/main/java/org/apache/hudi/io/hfile/HFileMetaBlock.java:
##########
@@ -34,6 +36,44 @@ protected HFileMetaBlock(HFileContext context,
public ByteBuffer readContent() {
return ByteBuffer.wrap(
getByteBuff(),
- startOffsetInBuff + HFILEBLOCK_HEADER_SIZE,
uncompressedSizeWithoutHeader);
+ readAttributesOpt.get().startOffsetInBuff + HFILEBLOCK_HEADER_SIZE,
+ readAttributesOpt.get().uncompressedSizeWithoutHeader);
+ }
+
+ // ================ Below are for Write ================
+
+ protected final List<KeyValueEntry> entries = new ArrayList<>();
+
+ public HFileMetaBlock(HFileContext context) {
+ super(context, HFileBlockType.META, -1L);
+ }
Review Comment:
Either we store these entries in side a block; or we have to keep a list of
such blocks before writing them. I think current design should be simpler.
--
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]