[
https://issues.apache.org/jira/browse/STORM-1693?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15230352#comment-15230352
]
Abhishek Agarwal commented on STORM-1693:
-----------------------------------------
I put up some code to catch any negative percentage here -
https://github.com/apache/storm/blob/1.x-branch/storm-core/src/jvm/org/apache/storm/metric/internal/CountStatAndMetric.java#L189
```
if (pct < 0) {
throw new IllegalStateException("This is never expected. " + timeSpent
+ "#" + timeNeeded + "#" + bucketTime[i]);
}
```
The exception was thrown in the topology with following statements
{noformat}
java.lang.IllegalStateException: This is never expected. 602745#-2745#0
java.lang.IllegalStateException: This is never expected. 602421#-2421#0
java.lang.IllegalStateException: This is never expected. 602467#-2467#0
{noformat}
> Negative counts in the UI for __metrics stream
> ----------------------------------------------
>
> Key: STORM-1693
> URL: https://issues.apache.org/jira/browse/STORM-1693
> Project: Apache Storm
> Issue Type: Bug
> Affects Versions: 1.0.0
> Reporter: Abhishek Agarwal
> Assignee: Abhishek Agarwal
> Priority: Critical
> Attachments: Screen Shot 2016-04-07 at 7.05.01 PM.png
>
>
> Metrics reported by UI are not correct. I am seeing negative counts for
> output stats in the bolt. The same application code works fine on 0.9.6
> version of storm.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)