yihua commented on code in PR #12866:
URL: https://github.com/apache/hudi/pull/12866#discussion_r2106129021
##########
hudi-io/src/main/java/org/apache/hudi/io/hfile/HFileWriterImpl.java:
##########
@@ -137,16 +138,16 @@ private void flushCurrentDataBlock() throws IOException {
rootIndexBlock.add(
currentDataBlock.getFirstKey(), lastDataBlockOffset,
blockBuffer.limit());
// 4. Create a new data block.
- currentDataBlock = new HFileDataBlock(context, currentOffset);
+ currentDataBlock = HFileDataBlock.createWritableDataBlock(context,
currentOffset);
}
// NOTE that: reader assumes that every meta info piece
// should be a separate meta block.
private void flushMetaBlocks() throws IOException {
for (Map.Entry<String, byte[]> e : metaInfo.entrySet()) {
- HFileMetaBlock currentMetaBlock = new HFileMetaBlock(context);
byte[] key = StringUtils.getUTF8Bytes(e.getKey());
- currentMetaBlock.add(key, e.getValue());
+ HFileMetaBlock currentMetaBlock =
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]