[ 
https://issues.apache.org/jira/browse/STORM-440?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14089428#comment-14089428
 ] 

Robert Joseph Evans commented on STORM-440:
-------------------------------------------

I think we still need to fix this in some way.  The issue is a usability one.  
Trying to create a NimbusClient or a DRPCClient requires a full cluster config. 
 If that is true, then we need to provide better APIs to let users do that in a 
simple way.  Perhaps we can add in a few new Constructors or make the config to 
getConfiguredClient optional and smarter.  And do the same for DRPC too.

{code}
public static NimbusClient getConfiguredClient() {
  return getConfgiuredClient(null);
}
public static NimbusClient getConfiguredClient(Map conf) {
  try {
    Map fullConf = Utils.readStormConfig();
    if (conf != null) {
        fullConf.putAll(conf);
    } 
    String nimbusHost = (String) fullConf.get(Config.NIMBUS_HOST);
    int nimbusPort = Utils.getInt(fullConf.get(Config.NIMBUS_THRIFT_PORT));
    return new NimbusClient(fullConf, nimbusHost, nimbusPort);
  } catch (TTransportException ex) {
    throw new RuntimeException(ex);
  }
}
{code}

> NimbusClient throws NPE if Config.STORM_THRIFT_TRANSPORT_PLUGIN is not set
> --------------------------------------------------------------------------
>
>                 Key: STORM-440
>                 URL: https://issues.apache.org/jira/browse/STORM-440
>             Project: Apache Storm (Incubating)
>          Issue Type: Bug
>    Affects Versions: 0.9.2-incubating
>            Reporter: Bryan Baugher
>            Priority: Minor
>
> We just upgraded from 0.8.2 to 0.9.2 and noticed that when constructing a 
> NimbusClient if Config.STORM_THRIFT_TRANSPORT_PLUGIN is not specified then 
> AuthUtils[1] throws a NPE.
> [1] - 
> https://github.com/bbaugher/incubator-storm/blob/master/storm-core/src/jvm/backtype/storm/security/auth/AuthUtils.java#L73-L74



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to