danny0405 commented on code in PR #13229:
URL: https://github.com/apache/hudi/pull/13229#discussion_r2101921934
##########
hudi-cli/src/test/java/org/apache/hudi/cli/integ/ITTestCompactionCommand.java:
##########
@@ -332,13 +332,15 @@ private void delete(JavaSparkContext jsc,
SparkRDDWriteClient<HoodieAvroPayload>
int numToDelete = records.size() / 2;
List<HoodieKey> toBeDeleted =
records.stream().map(HoodieRecord::getKey).limit(numToDelete).collect(Collectors.toList());
JavaRDD<HoodieKey> deleteRecords = jsc.parallelize(toBeDeleted, 1);
- client.delete(deleteRecords, newCommitTime);
+ client.commit(newCommitTime, client.delete(deleteRecords, newCommitTime));
}
private JavaRDD<WriteStatus> operateFunc(
HoodieClientTestBase.Function3<JavaRDD<WriteStatus>,
SparkRDDWriteClient, JavaRDD<HoodieRecord>, String> writeFn,
SparkRDDWriteClient<HoodieAvroPayload> client, JavaRDD<HoodieRecord>
writeRecords, String commitTime)
throws IOException {
- return writeFn.apply(client, writeRecords, commitTime);
+ List<WriteStatus> writeStatuses = writeFn.apply(client, writeRecords,
commitTime).collect();
+ client.commit(commitTime, jsc.parallelize(writeStatuses));
+ return jsc.parallelize(writeStatuses);
Review Comment:
nit: the return val is never used.
--
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]