You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@storm.apache.org by GitBox <gi...@apache.org> on 2020/09/09 22:16:57 UTC

[GitHub] [storm] bipinprasad commented on a change in pull request #3333: STORM-3697 add capacity metric

bipinprasad commented on a change in pull request #3333:
URL: https://github.com/apache/storm/pull/3333#discussion_r485952361



##########
File path: storm-client/src/jvm/org/apache/storm/metrics2/TaskMetrics.java
##########
@@ -50,6 +52,13 @@ public TaskMetrics(WorkerTopologyContext context, String componentId, Integer ta
         this.samplingRate = ConfigUtils.samplingRate(topoConf);
     }
 
+    public void setCapacity(double capacity) {

Review comment:
       Does this method need to guard against multiple calls, by tracking previous capacity and adding only the incremental difference to gauge.addValue()  - so the total capacity is always the capacity in the latest call to setCapacity? 
   
   Alternatively, respecting only first call and ignoring subsequent calls.




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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org