You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@storm.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2014/12/24 00:23:13 UTC
[jira] [Commented] (STORM-603) storm-kafka: Log errors when missing
required configuration fields
[ https://issues.apache.org/jira/browse/STORM-603?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14257682#comment-14257682 ]
ASF GitHub Bot commented on STORM-603:
--------------------------------------
GitHub user curtisallen opened a pull request:
https://github.com/apache/storm/pull/361
STORM-603 Log errors when required kafka params are missing
https://issues.apache.org/jira/browse/STORM-603
I was upgrading our topologies to storm-0.9.3 this [commit](https://github.com/apache/storm/commit/2596e335f27a57784a93a57823bd93dde587909f) 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.
This pull requests adds logging when required errors are missing.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/curtisallen/storm STORM-603
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/storm/pull/361.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #361
----
commit 326cc1c796d073c768de4b5aced1669bd47c6891
Author: Curtis Allen <cu...@pearson.com>
Date: 2014-12-23T23:13:31Z
Log errors when required kafka params are missing
----
> storm-kafka: Log errors when missing required configuration fields
> ------------------------------------------------------------------
>
> Key: STORM-603
> URL: https://issues.apache.org/jira/browse/STORM-603
> Project: Apache Storm
> Issue Type: Bug
> Reporter: Curtis Allen
> Assignee: Curtis Allen
>
> I was upgrading our topologies to storm-0.9.3 this [commit|https://github.com/apache/storm/commit/2596e335f27a57784a93a57823bd93dde587909f] introduced a change that threw me for a loop. When submitting my topology I got the following error.
> {code}
> [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
> {code}
> It took me a while to figure out that this error stems from missing the {code}backtype.storm.Config.STORM_ZOOKEEPER_CONNECTION_TIMEOUT{code} property in the conf map provided to the {code}storm.kafka.DynamicBrokersReader{code} constructer. It would be nice to check the required configuration parameters and throw a RuntimeException if any are missing.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)