lokeshj1703 commented on code in PR #13229:
URL: https://github.com/apache/hudi/pull/13229#discussion_r2086082602
##########
hudi-spark-datasource/hudi-spark/src/test/java/org/apache/hudi/client/TestHoodieClientMultiWriter.java:
##########
@@ -1306,28 +1304,32 @@ private void
ingestBatch(Function3<JavaRDD<WriteStatus>, SparkRDDWriteClient, Ja
writeClient.startCommitWithTime(commitTime);
countDownLatch.countDown();
countDownLatch.await();
- JavaRDD<WriteStatus> statusJavaRDD = writeFn.apply(writeClient, records,
commitTime);
- statusJavaRDD.collect();
+ List<WriteStatus> statuses = writeFn.apply(writeClient, records,
commitTime).collect();
+ writeClient.commit(commitTime, jsc.parallelize(statuses));
}
private void createCommitWithInsertsForPartition(HoodieWriteConfig cfg,
SparkRDDWriteClient client,
String prevCommitTime,
String newCommitTime, int numRecords,
String partition) throws
Exception {
JavaRDD<WriteStatus> result = insertBatch(cfg, client, newCommitTime,
prevCommitTime, numRecords, SparkRDDWriteClient::insert,
false, false, numRecords, numRecords, 1, Option.of(partition),
INSTANT_GENERATOR);
- assertTrue(client.commit(newCommitTime, result), "Commit should succeed");
+ }
+
+ private JavaRDD<WriteStatus> createCommitWithInserts(HoodieWriteConfig cfg,
SparkRDDWriteClient client,
+ String prevCommitTime,
String newCommitTime, int numRecords) throws Exception {
+ return createCommitWithInserts(cfg, client, prevCommitTime, newCommitTime,
numRecords, false);
}
private JavaRDD<WriteStatus> createCommitWithInserts(HoodieWriteConfig cfg,
SparkRDDWriteClient client,
String prevCommitTime,
String newCommitTime, int numRecords,
- boolean doCommit)
throws Exception {
+ boolean leaveInflight)
throws Exception {
Review Comment:
Addressed
--
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]