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


##########
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:
   I can use variables, but from what I could see referring to metric names 
using inline literal strings appears to be the common pattern in the codebase 
and hence this usage. Let me know what you think.



##########
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:
   I can use const variables, but from what I could see referring to metric 
names using inline literal strings appears to be the common pattern in the 
codebase and hence this usage. Let me know what you think.



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