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

    https://github.com/apache/storm/pull/1744#discussion_r89788894
  
    --- Diff: storm-core/src/jvm/org/apache/storm/nimbus/NimbusInfo.java ---
    @@ -49,17 +51,17 @@ public static NimbusInfo parse(String nimbusInfo) {
             }
         }
     
    -    public static NimbusInfo fromConf(Map conf) {
    +    public static NimbusInfo fromConf(Map<String, Object> conf) {
             try {
                 String host = 
InetAddress.getLocalHost().getCanonicalHostName();
                 if (conf.containsKey(Config.STORM_LOCAL_HOSTNAME)) {
    -                host = conf.get(Config.STORM_LOCAL_HOSTNAME).toString();
    +                host = (String) conf.get(Config.STORM_LOCAL_HOSTNAME);
                     LOG.info("Overriding nimbus host to storm.local.hostname 
-> {}", host);
                 } else {
                     LOG.info("Nimbus figures out its name to {}", host);
                 }
     
    -            int port = 
Integer.parseInt(conf.get(Config.NIMBUS_THRIFT_PORT).toString());
    +            int port = Utils.getInt(conf.get(Config.NIMBUS_THRIFT_PORT), 
6627);
    --- End diff --
    
    Yes but this helps with unit tests where we don't have to supply configs 
even when things are mocked out.


---
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