You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@storm.apache.org by Ethanlm <gi...@git.apache.org> on 2018/08/03 16:10:39 UTC

[GitHub] storm pull request #2771: STORM-3157: General improvement to StormMetricsReg...

Github user Ethanlm commented on a diff in the pull request:

    https://github.com/apache/storm/pull/2771#discussion_r207594931
  
    --- Diff: storm-server/src/main/java/org/apache/storm/metric/StormMetricsRegistry.java ---
    @@ -50,19 +61,19 @@ public static void startMetricsReporters(Map<String, Object> topoConf) {
             }
         }
     
    -    private static <T extends Metric> T register(final String name, T metric) {
    -        T ret;
    +    @Override
    +    //This is more similar to super#getOrAdd than super#register
    +    public <T extends Metric> T register(final String name, T metric) throws IllegalArgumentException {
    --- End diff --
    
    if the metric is MetricSet, it will be having the same issue with the old code.


---