linliu-code commented on code in PR #12866:
URL: https://github.com/apache/hudi/pull/12866#discussion_r2105884607
##########
hudi-io/src/main/java/org/apache/hudi/io/hfile/HFileFileInfoBlock.java:
##########
@@ -61,4 +69,39 @@ public HFileInfo readFileInfo() throws IOException {
}
return new HFileInfo(fileInfoMap);
}
+
+ // ================ Below are for Write ================
+
+ public HFileFileInfoBlock(HFileContext context) {
+ super(context, HFileBlockType.FILE_INFO, -1L);
+ }
+
+ public void add(String name, byte[] value) {
+ entries.put(name, value);
+ }
+
+ @Override
+ public ByteBuffer getPayload() {
+ ByteBuffer buff = ByteBuffer.allocate(context.getBlockSize() * 2);
Review Comment:
Yeah, since file info normally small and our block size is large, so I set
it that way. If we really need to handle unlimited file info, we can use other
outputstream first to store them.
--
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]