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

    https://github.com/apache/storm/pull/2764#discussion_r208968787
  
    --- Diff: 
storm-server/src/main/java/org/apache/storm/daemon/nimbus/Nimbus.java ---
    @@ -2807,16 +2897,15 @@ public void launchServer() throws Exception {
                                             }
                                         });
     
    -            StormMetricsRegistry.registerGauge("nimbus:num-supervisors", 
() -> state.supervisors(null).size());
    -            StormMetricsRegistry.registerGauge("nimbus:fragmented-memory", 
this::fragmentedMemory);
    -            StormMetricsRegistry.registerGauge("nimbus:fragmented-cpu", 
this::fragmentedCpu);
    -            StormMetricsRegistry.registerGauge("nimbus:available-memory", 
() -> nodeIdToResources.get().values()
    +            //Be cautious using method reference instead of lambda. 
subexpression preceding :: will be evaluated only upon evaluation
    --- End diff --
    
    Yes, I think I've seen it before too :)


---

Reply via email to