yihua commented on code in PR #6664:
URL: https://github.com/apache/hudi/pull/6664#discussion_r983020758
##########
hudi-spark-datasource/hudi-spark/src/test/scala/org/apache/hudi/TestHoodieSparkSqlWriter.scala:
##########
@@ -1128,12 +1128,14 @@ class TestHoodieSparkSqlWriter {
new JavaSparkContext(sc), "", table_path, hoodieFooTableName,
mapAsJavaMap(compactionOperation)).asInstanceOf[SparkRDDWriteClient[HoodieRecordPayload[Nothing]]]
- client.scheduleCompaction(org.apache.hudi.common.util.Option.empty())
- client.close()
+ val compactionInstant =
client.scheduleCompaction(org.apache.hudi.common.util.Option.empty()).get()
+ client.compact(compactionInstant)
Review Comment:
@Aiden-Dong Thanks for raising this. Actually, `client.compact()` executes
the compaction by writing the new base files without committing to the timeline
of the table, i.e., the compaction instant is still inflight in the timeline.
So this is fine.
--
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]