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

    https://github.com/apache/storm/pull/2228#discussion_r128286548
  
    --- Diff: storm-client/src/jvm/org/apache/storm/utils/NimbusClient.java ---
    @@ -109,12 +109,13 @@ public static NimbusClient 
getConfiguredClientAs(Map<String, Object> conf, Strin
             }
     
             List<String> seeds;
    -        if(conf.containsKey(Config.NIMBUS_HOST)) {
    +        if (conf.containsKey(Config.NIMBUS_HOST)) {
                 LOG.warn("Using deprecated config {} for backward 
compatibility. Please update your storm.yaml so it only has config {}",
    -                     Config.NIMBUS_HOST, Config.NIMBUS_SEEDS);
    +                    Config.NIMBUS_HOST, Config.NIMBUS_SEEDS);
                 seeds = 
Lists.newArrayList(conf.get(Config.NIMBUS_HOST).toString());
             } else {
    -            seeds = (List<String>) conf.get(Config.NIMBUS_SEEDS);
    +            Object nimbusSeeds = conf.get(Config.NIMBUS_SEEDS);
    +            seeds = nimbusSeeds instanceof String[] ? 
Lists.newArrayList((String[]) nimbusSeeds) : 
Lists.newArrayList(nimbusSeeds.toString());
    --- End diff --
    
    If this is an administrator configuration setting, can we process the value 
consistently such that `conf.get(Config.NIMBUS_SEEDS)` always returns a list 
even if there is only one value. Otherwise, we will have to do this checking at 
every spot where this value is accessed.
    
    How is this config field validated? Do we allow either a single value or a 
list?


---
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 [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to