You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by "amrishlal (via GitHub)" <gi...@apache.org> on 2023/06/02 17:04:02 UTC

[GitHub] [hudi] amrishlal commented on a diff in pull request #8759: [HUDI-6313] Add metrics counters for compaction requested/completed events.

amrishlal commented on code in PR #8759:
URL: https://github.com/apache/hudi/pull/8759#discussion_r1214616166


##########
hudi-client/hudi-spark-client/src/test/java/org/apache/hudi/table/action/compact/TestHoodieCompactor.java:
##########
@@ -129,6 +152,10 @@ public void testCompactionEmpty() {
       String compactionInstantTime = HoodieActiveTimeline.createNewInstantTime();
       Option<HoodieCompactionPlan> plan = table.scheduleCompaction(context, compactionInstantTime, Option.empty());
       assertFalse(plan.isPresent(), "If there is nothing to compact, result will be empty");
+
+      // Verify compaction.requested, compaction.completed metrics counts.
+      assertEquals(0, getCompactionMetricCount("counter", "compaction.requested"));

Review Comment:
   @SteNicholas Using `HoodieTimeline.REQUESTED_COMPACTION_SUFFIX` and `HoodieTimeline.COMPLETED_COMPACTION_SUFFIX` as `REQUESTED_COMPACTION_EXTENSION` was leading to a double dot in the final metric name.



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