linliu-code commented on code in PR #13008:
URL: https://github.com/apache/hudi/pull/13008#discussion_r2008527592


##########
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:
   Will add a few more metrics.



-- 
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]

Reply via email to