xiarixiaoyao commented on a change in pull request #4753:
URL: https://github.com/apache/hudi/pull/4753#discussion_r802329830
##########
File path:
hudi-client/hudi-spark-client/src/main/java/org/apache/hudi/client/HoodieSparkCompactor.java
##########
@@ -43,19 +48,25 @@ public HoodieSparkCompactor(BaseHoodieWriteClient<T,
JavaRDD<HoodieRecord<T>>, J
}
@Override
- public void compact(HoodieInstant instant) throws IOException {
+ public void compact(HoodieInstant instant) {
LOG.info("Compactor executing compaction " + instant);
SparkRDDWriteClient<T> writeClient = (SparkRDDWriteClient<T>)
compactionClient;
- JavaRDD<WriteStatus> res = writeClient.compact(instant.getTimestamp());
+ HoodieWriteMetadata<JavaRDD<WriteStatus>> compactionMetadata =
writeClient.compact(instant.getTimestamp());
+ List<HoodieWriteStat> writeStats =
compactionMetadata.getCommitMetadata().get()
+ .getPartitionToWriteStats()
+ .values()
+ .stream()
+ .flatMap(Collection::stream)
+ .collect(Collectors.toList());
this.context.setJobStatus(this.getClass().getSimpleName(), "Collect
compaction write status");
Review comment:
now with this patch we no need to set JobStatus here, since no spark job
will trigger, pls delete this line
--
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]