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

    https://github.com/apache/storm/pull/2771#discussion_r204876125
  
    --- Diff: 
storm-server/src/main/java/org/apache/storm/daemon/supervisor/Supervisor.java 
---
    @@ -312,7 +315,7 @@ public void launchDaemon() {
                 launch();
                 Utils.addShutdownHookWithForceKillIn1Sec(this::close);
     
    -            registerWorkerNumGauge("supervisor:num-slots-used-gauge", 
conf);
    +            registerGauge(name(SUPERVISOR, "num-slots-used-gauge"), () -> 
SupervisorUtils.supervisorWorkerIds(conf).size());
    --- End diff --
    
    This is personal preference, but I think static method imports can tend to 
make the code less readable. It's fine when the static import is something 
well-known like `assertThat` in a test, but having something like 
`registerGauge` show up like this makes it look like the method exists on this 
class.


---

Reply via email to