You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by GitBox <gi...@apache.org> on 2022/02/07 12:56:06 UTC
[GitHub] [hudi] xiarixiaoyao commented on a change in pull request #4753: [HUDI-3370] The files recorded in the commit may not match the actual ones for MOR Compaction
xiarixiaoyao commented on a change in pull request #4753:
URL: https://github.com/apache/hudi/pull/4753#discussion_r800627100
##########
File path: hudi-client/hudi-spark-client/src/main/java/org/apache/hudi/client/SparkRDDWriteClient.java
##########
@@ -299,7 +299,8 @@ protected void completeCompaction(HoodieCommitMetadata metadata, JavaRDD<WriteSt
HoodieTable<T, JavaRDD<HoodieRecord<T>>, JavaRDD<HoodieKey>, JavaRDD<WriteStatus>> table,
String compactionCommitTime) {
this.context.setJobStatus(this.getClass().getSimpleName(), "Collect compaction write status and commit compaction");
- List<HoodieWriteStat> writeStats = writeStatuses.map(WriteStatus::getStat).collect();
+ List<HoodieWriteStat> writeStats = metadata.getPartitionToWriteStats().entrySet().stream().flatMap(e ->
+ e.getValue().stream()).collect(Collectors.toList());
Review comment:
@zhangyue19921010
maybe i understand what you mean,
but there may be other changes, thinks that: now i use sparksql to do compaction: writeStatuses.map(WriteStatus::getStat).collect() will call three times, maybe we also need to do modify for CompactHelpers.createCompactionMetadata.
--
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: commits-unsubscribe@hudi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org