yihua commented on code in PR #13977:
URL: https://github.com/apache/hudi/pull/13977#discussion_r2373551438


##########
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:
   We have the exact bytes for each key so the size of each key-value entry can 
be accurately measured.  Why is the longest entry size needed here which 
artificially increases the memory to allocate for the byte buffer?



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