linliu-code commented on code in PR #13977:
URL: https://github.com/apache/hudi/pull/13977#discussion_r2376515451


##########
hudi-io/src/main/java/org/apache/hudi/io/hfile/HFileIndexBlock.java:
##########
@@ -43,6 +43,8 @@ protected HFileIndexBlock(HFileContext context,
   public void add(byte[] firstKey, long offset, int size) {
     Key key = new Key(firstKey);
     entries.add(new BlockIndexEntry(key, Option.empty(), offset, size));
+    // 8 bytes for offset, 4 bytes for size.
+    longestEntrySize = Math.max(longestEntrySize, key.getContentLength() + 12);

Review Comment:
   I don't want to create a bytebuffer for each entry. I don't measure the 
performance, but I guess it should be worse if we initialize for every record.



-- 
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]

Reply via email to