[
https://issues.apache.org/jira/browse/STORM-1252?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15163079#comment-15163079
]
ASF GitHub Bot commented on STORM-1252:
---------------------------------------
Github user abhishekagarwal87 commented on the pull request:
https://github.com/apache/storm/pull/1147#issuecomment-188278662
PR is indeed quite large. StatsUtil file is too large right now. I think
while we are porting from clojure, we should also shift from functional
paradigm to Object oriented paradigm. In that spirit, many utility functions
can go directly inside the classes on which they are invoked upon. e.g.
```
public static void emittedTuple(CommonStats stats, String stream) {
stats.getEmitted().incBy(stream, stats.rate);
}
```
can go to CommonStats itself
```
public void emittedTuple(String stream) {
getEmitted().incBy(stream, rate);
}
```
Similarly `public static Map renderStats(SpoutExecutorStats stats)` can go
to SpoutExecutorStats class itself. These are few examples I could think of in
a quick look. But I hope you got the gist of it. It would be good to get the
opinion of the @revans2 and and other committers on this as well.
> port backtype.storm.stats to java
> ---------------------------------
>
> Key: STORM-1252
> URL: https://issues.apache.org/jira/browse/STORM-1252
> Project: Apache Storm
> Issue Type: New Feature
> Components: storm-core
> Reporter: Robert Joseph Evans
> Assignee: Cody
> Labels: java-migration, jstorm-merger
>
> clojure methods for getting/setting built-in statistics. Mostly wrappers
> around some java classes.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)