Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
None
-
None
Description
I was upgrading our topologies to storm-0.9.3 this commit introduced a change that threw me for a loop. When submitting my topology I got the following error.
[main] ERROR storm.kafka.DynamicBrokersReader - Couldn't connect to zookeeper java.lang.IllegalArgumentException: Don't know how to convert null to int at backtype.storm.utils.Utils.getInt(Utils.java:301) ~[storm-core-0.9.3.jar:0.9.3] at storm.kafka.DynamicBrokersReader.<init>(DynamicBrokersReader.java:47) ~[gambit-storm-threads-0.0.1-SNAPSHOT-jar-with-dependencies.jar:na] at com.pearson.gambit.threads.storm.ThreadsTopology.main(ThreadsTopology.java:45) [gambit-storm-threads-0.0.1-SNAPSHOT-jar-with-dependencies.jar:na] Exception in thread "main" java.lang.RuntimeException: java.lang.RuntimeException: java.lang.NullPointerException at storm.kafka.DynamicBrokersReader.getBrokerInfo(DynamicBrokersReader.java:81) at com.pearson.gambit.threads.storm.ThreadsTopology.main(ThreadsTopology.java:48) Caused by: java.lang.RuntimeException: java.lang.NullPointerException at storm.kafka.DynamicBrokersReader.getNumPartitions(DynamicBrokersReader.java:94) at storm.kafka.DynamicBrokersReader.getBrokerInfo(DynamicBrokersReader.java:65) ... 1 more Caused by: java.lang.NullPointerException at storm.kafka.DynamicBrokersReader.getNumPartitions(DynamicBrokersReader.java:91) ... 2 more
It took me a while to figure out that this error stems from missing the
backtype.storm.Config.STORM_ZOOKEEPER_CONNECTION_TIMEOUT
property in the conf map provided to the
storm.kafka.DynamicBrokersReader
constructer. It would be nice to check the required configuration parameters and throw a RuntimeException if any are missing.