[
https://issues.apache.org/jira/browse/STORM-440?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14640173#comment-14640173
]
ASF GitHub Bot commented on STORM-440:
--------------------------------------
Github user caofangkun commented on a diff in the pull request:
https://github.com/apache/storm/pull/648#discussion_r35406122
--- Diff: storm-core/src/jvm/backtype/storm/utils/DRPCClient.java ---
@@ -46,7 +46,22 @@ public DRPCClient(Map conf, String host, int port,
Integer timeout) throws TTran
this.port = port;
this.client = new DistributedRPC.Client(_protocol);
}
-
+
+ public static DistributedRPC.Client getConfiguredDRPCClient(String
host, int port) {
+ return getConfiguredDRPCClient(null, host, port);
+ }
+
+ public static DistributedRPC.Client getConfiguredDRPCClient(Map conf,
String host, int port) {
+ try {
+ Map fullConf = Utils.readStormConfig();
+ if (conf != null) {
+ fullConf.putAll(conf);
+ }
+ return new DRPCClient(conf, host, port).getClient();
--- End diff --
shoud be ```return new DRPCClient(fullConf, host, port).getClient();```
> 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
> Issue Type: Bug
> Affects Versions: 0.9.2-incubating
> Reporter: Bryan Baugher
> Assignee: Sanket Reddy
> 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.3.4#6332)