vinothchandar commented on a change in pull request #1009: [HUDI-308] Avoid
Renames for tracking state transitions of all actions on dataset
URL: https://github.com/apache/incubator-hudi/pull/1009#discussion_r348092054
##########
File path:
hudi-client/src/main/java/org/apache/hudi/io/HoodieCommitArchiveLog.java
##########
@@ -169,7 +180,14 @@ public boolean archiveIfRequired(final JavaSparkContext
jsc) throws IOException
}).limit(commitTimeline.countInstants() - minCommitsToKeep));
}
- return instants;
+ // For archiving and cleaning instants, we need to include intermediate
state files if they exist
+ HoodieActiveTimeline rawActiveTimeline = new
HoodieActiveTimeline(metaClient, false);
+ Map<Pair<String, String>, List<HoodieInstant>> groupByTsAction =
rawActiveTimeline.getInstants()
+ .collect(Collectors.groupingBy(x -> Pair.of(x.getTimestamp(),
+ x.getAction().equals(HoodieTimeline.COMPACTION_ACTION) ?
HoodieTimeline.COMMIT_ACTION : x.getAction())));
Review comment:
dont we have similar logic in timeline class itself? can we consolidate
there?
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services