nsivabalan commented on code in PR #13008:
URL: https://github.com/apache/hudi/pull/13008#discussion_r2008434375
##########
hudi-common/src/test/java/org/apache/hudi/common/table/read/TestHoodieFileGroupReaderBase.java:
##########
@@ -250,6 +285,28 @@ 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.
+ long totalLogRecords = activeTimeline
+
.readCommitMetadata(compactionInstants.get(0)).getTotalLogRecordsCompacted();
Review Comment:
I understand thats the only gap, but when we are writing a new test to
validate the stats, why just validate just log records. lets try to validate
all stats w/ some expected value.
--
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]