linliu-code commented on code in PR #13008:
URL: https://github.com/apache/hudi/pull/13008#discussion_r2010991046
##########
hudi-common/src/test/java/org/apache/hudi/common/table/read/TestHoodieFileGroupReaderBase.java:
##########
@@ -250,6 +287,38 @@ private Map<String, String>
getCommonConfigs(RecordMergeMode recordMergeMode) {
return configMapping;
}
+ private void validateCompactionStats(StorageConfiguration<?> storageConf,
+ String tablePath) {
+ HoodieTableMetaClient metaClient =
HoodieTestUtils.createMetaClient(storageConf, tablePath);
+ HoodieTimeline activeTimeline = metaClient.getActiveTimeline();
+ List<HoodieInstant> compactionInstants = activeTimeline
+ .getCommitsAndCompactionTimeline()
+ .getInstants()
+ .stream().filter(i -> i.getAction().equals(COMMIT_ACTION))
+ .collect(Collectors.toList());
+ assertFalse(compactionInstants.isEmpty());
+
+ try {
+ // Validate if total log records is updated.
+ // More validation can be added here if needed.
+ HoodieCommitMetadata metadata = activeTimeline
+ .readCommitMetadata(compactionInstants.get(0));
+ assertTrue(metadata.getTotalLogRecordsCompacted() > 0);
Review Comment:
Done.
--
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]