adoroszlai commented on code in PR #7426:
URL: https://github.com/apache/ozone/pull/7426#discussion_r1843432761


##########
hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/common/helpers/BlockDeletingServiceMetrics.java:
##########
@@ -184,6 +207,42 @@ public long getTotalLockTimeoutTransactionCount() {
     return totalLockTimeoutTransactionCount.value();
   }
 
+  public void setStartTimeOfLastIteration(long startTimeOfLastIteration) {
+    this.startTimeOfLastIteration.set(startTimeOfLastIteration);
+  }
+
+  public void setDurationOfLastIteration(long durationOfLastIteration) {
+    this.durationOfLastIteration.set(durationOfLastIteration);
+  }
+
+  public void setBlockChosenCountInLastIteration(
+      long blockChosenCountInLastIteration) {
+    this.blockChosenCountInLastIteration.set(blockChosenCountInLastIteration);
+  }
+
+  public void setContainerChosenCountInLastIteration(
+      long containerChosenCountInLastIteration) {
+    
this.containerChosenCountInLastIteration.set(containerChosenCountInLastIteration);
+  }
+
+  public void resetLastIterationCounts() {
+    this.successCountInLastIteration.incr(-1L * 
this.successCountInLastIteration.value());
+    this.successBytesInLastIteration.incr(-1L * 
this.successBytesInLastIteration.value());
+    this.failureCountInLastIteration.incr(-1L * 
this.failureCountInLastIteration.value());
+  }
+
+  public void incrSuccessCountInLastIteration(long 
successCountInLastIteration) {
+    this.successCountInLastIteration.incr(successCountInLastIteration);
+  }
+
+  public void incrSuccessBytesInLastIteration(long 
successBytesInLastIteration) {
+    this.successBytesInLastIteration.incr(successBytesInLastIteration);
+  }

Review Comment:
   Thanks @Tejaskriya for the patch.
   
   Parameters can be renamed to `delta` to fix checkstyle failures:
   
   ```
   
hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/common/helpers/BlockDeletingServiceMetrics.java
    234: 'successCountInLastIteration' hides a field.
    238: 'successBytesInLastIteration' hides a field.
   ```
   
   https://github.com/Tejaskriya/ozone/actions/runs/11813260671/job/32909976492



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to