Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

fix format conversion for NimbusClient, and make timeout optional

  • Loading branch information...
commit 2a78dc02a54693592dd44c8555325d423c3ba60d 1 parent 2123a17
afeng authored
Showing with 5 additions and 2 deletions.
  1. +5 −2 src/jvm/backtype/storm/utils/NimbusClient.java
View
7 src/jvm/backtype/storm/utils/NimbusClient.java
@@ -16,8 +16,7 @@ public static NimbusClient getConfiguredClient(Map conf) {
try {
String nimbusHost = (String) conf.get(Config.NIMBUS_HOST);
int nimbusPort = Utils.getInt(conf.get(Config.NIMBUS_THRIFT_PORT));
- String timeoutStr = (String) conf.get(Config.NIMBUS_TASK_TIMEOUT_SECS);
- Integer timeout = new Integer(timeoutStr);
+ Integer timeout = new Integer(Utils.getInt(conf.get(Config.NIMBUS_TASK_TIMEOUT_SECS)));
return new NimbusClient(conf, nimbusHost, nimbusPort, timeout);
} catch (TTransportException ex) {
LOG.info(ex.getMessage(), ex);
@@ -25,6 +24,10 @@ public static NimbusClient getConfiguredClient(Map conf) {
}
}
+ public NimbusClient(Map conf, String host, int port) throws TTransportException {
+ this(conf, host, port, null);
+ }
+
public NimbusClient(Map conf, String host, int port, Integer timeout) throws TTransportException {
super(conf, host, port, timeout);
_client = new Nimbus.Client(_protocol);
Please sign in to comment.
Something went wrong with that request. Please try again.