wangyinsheng commented on code in PR #13134:
URL: https://github.com/apache/hudi/pull/13134#discussion_r2039587846
##########
hudi-hadoop-mr/src/test/java/org/apache/hudi/hadoop/hive/TestHoodieCombineHiveInputFormat.java:
##########
@@ -447,34 +445,43 @@ public void testHoodieRealtimeCombineHoodieInputFormat()
throws Exception {
schema.toString(), HoodieTimeline.COMMIT_ACTION);
FileCreateUtilsLegacy.createCommit(COMMIT_METADATA_SER_DE,
tempDir.toString(), commitTime, Option.of(commitMetadata));
+ long writtenBytes = 0;
// insert 1000 update records to log file 0
String newCommitTime = "101";
HoodieLogFormat.Writer writer =
InputFormatTestUtil.writeDataBlockToLogFile(partitionDir, storage,
schema, "fileid0",
commitTime, newCommitTime,
numRecords, numRecords, 0);
+ writtenBytes += writer.getCurrentSize();
writer.close();
// insert 1000 update records to log file 1
writer =
InputFormatTestUtil.writeDataBlockToLogFile(partitionDir, storage,
schema, "fileid1",
commitTime, newCommitTime,
numRecords, numRecords, 0);
+ writtenBytes += writer.getCurrentSize();
writer.close();
// insert 1000 update records to log file 2
writer =
InputFormatTestUtil.writeDataBlockToLogFile(partitionDir, storage,
schema, "fileid2",
commitTime, newCommitTime,
numRecords, numRecords, 0);
+ writtenBytes += writer.getCurrentSize();
writer.close();
TableDesc tblDesc = Utilities.defaultTd;
// Set the input format
- tblDesc.setInputFileFormatClass(HoodieCombineHiveInputFormat.class);
+ tblDesc.setInputFileFormatClass(HoodieParquetRealtimeInputFormat.class);
Review Comment:
The value of `mapreduce.input.fileinputformat.split.maxsize` is typically
set as hdfs block size, such as 256MB(256*1024*1024),This value is
significantly larger than the split counts of most tables, resulting in
`HoodieCombineHiveInputFormat` generating only a single split, which severely
impacts Hive query performance.
I found this issue in production, and verified this fix in the testing
environment.
--
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]