xushiyan commented on code in PR #7720:
URL: https://github.com/apache/hudi/pull/7720#discussion_r1083135286
##########
hudi-common/src/test/java/org/apache/hudi/common/testutils/HoodieTestDataGenerator.java:
##########
@@ -607,8 +608,14 @@ public List<HoodieRecord>
generateInsertsForPartition(String instantTime, Intege
}
public Stream<HoodieRecord> generateInsertsStream(String commitTime, Integer
n, boolean isFlattened, String schemaStr, boolean containsAllPartitions) {
+ AtomicInteger partitionIndex = new AtomicInteger(0);
return generateInsertsStream(commitTime, n, isFlattened, schemaStr,
containsAllPartitions,
- () -> partitionPaths[rand.nextInt(partitionPaths.length)],
+ () -> {
+ // round robin to ensure we generate inserts for all partition paths
+ String partitionToUse = partitionPaths[partitionIndex.get()];
+ partitionIndex.set((partitionIndex.get() + 1) %
partitionPaths.length);
+ return partitionToUse;
Review Comment:
so with this change we can guarantee all target partitions have records.
then we don't need to bump 10 records to 100? so we can make it faster. We just
need to make sure num records > num partitions here
##########
hudi-utilities/src/test/java/org/apache/hudi/utilities/deltastreamer/TestHoodieDeltaStreamerWithMultiWriter.java:
##########
@@ -82,6 +83,7 @@ void
testUpsertsContinuousModeWithMultipleWritersForConflicts(HoodieTableType ta
tableBasePath = basePath + "/testtable_" + tableType;
prepareInitialConfigs(fs(), basePath, "foo");
TypedProperties props = prepareMultiWriterProps(fs(), basePath,
propsFilePath);
+ props.setProperty(HoodieCompactionConfig.PARQUET_SMALL_FILE_LIMIT.key(),
"0");
Review Comment:
should this be applicable to some cases in TestHoodieDeltaStreamer ?
--
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]