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

    https://github.com/apache/storm/pull/1744#discussion_r89673963
  
    --- Diff: 
storm-core/src/jvm/org/apache/storm/cluster/IStormClusterState.java ---
    @@ -117,10 +128,60 @@
     
         public ErrorInfo lastError(String stormId, String componentId);
     
    -    public void setCredentials(String stormId, Credentials creds, Map 
topoConf) throws NoSuchAlgorithmException;
    +    public void setCredentials(String stormId, Credentials creds, 
Map<String, Object> topoConf) throws NoSuchAlgorithmException;
     
         public Credentials credentials(String stormId, Runnable callback);
     
         public void disconnect();
    -
    -}
    +    
    +    /**
    +     * @return All of the supervisors with the ID as the key
    +     */
    +    default Map<String, SupervisorInfo> allSupervisorInfo() {
    +        return allSupervisorInfo(null);
    +    }
    +
    +    /**
    +     * @param callback be alerted if the list of supervisors change
    +     * @return All of the supervisors with the ID as the key
    +     */
    +    default Map<String, SupervisorInfo> allSupervisorInfo(Runnable 
callback) {
    +        Map<String, SupervisorInfo> ret = new HashMap<>();
    +        for (String id: supervisors(callback)) {
    +            ret.put(id, supervisorInfo(id));
    +        }
    +        return ret;
    +    }
    +    
    +    /**
    +     * Get a topology ID from the name of a topology
    +     * @param topologyName the name of the topology to look for
    +     * @return the id of the topology or null if it is not alive.
    +     */
    +    default String getTopoId(final String topologyName) {
    --- End diff --
    
    Nitpick: Consider returning Optional<String>


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to