Github user HeartSaVioR commented on a diff in the pull request:
https://github.com/apache/storm/pull/2184#discussion_r125291429
--- Diff:
storm-client/src/jvm/org/apache/storm/daemon/metrics/SpoutThrottlingMetrics.java
---
@@ -26,32 +27,20 @@
private final CountMetric skippedInactive = new CountMetric();
public SpoutThrottlingMetrics() {
- this.metricMap.put("skipped-max-spout", skippedMaxSpout);
- this.metricMap.put("skipped-throttle", skippedThrottle);
- this.metricMap.put("skipped-inactive", skippedInactive);
- }
-
- public CountMetric getSkippedMaxSpout() {
- return skippedMaxSpout;
- }
-
- public CountMetric getSkippedThrottle() {
- return skippedThrottle;
- }
-
- public CountMetric getSkippedInactive() {
- return skippedInactive;
+ metricMap.put("skipped-max-spout-ms", skippedMaxSpout);
+ metricMap.put("skipped-throttle-ms", skippedThrottle);
+ metricMap.put("skipped-inactive-ms", skippedInactive);
}
- public void skippedMaxSpout(CommonStats stats) {
- this.skippedMaxSpout.incrBy(stats.getRate());
+ public void skippedMaxSpoutMs(long ms) {
+ this.skippedMaxSpout.incrBy(ms);
--- End diff --
Why not also rename the fields (skippedMaxSpout, skippedThrottle,
skippedInactive) to add `Ms` as postfix?
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---