You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@storm.apache.org by darionyaphet <gi...@git.apache.org> on 2016/07/25 14:28:25 UTC
[GitHub] storm pull request #1590: [STORM-2003] Make sure config contains TOPIC befor...
GitHub user darionyaphet opened a pull request:
https://github.com/apache/storm/pull/1590
[STORM-2003] Make sure config contains TOPIC before get it
[STORM-2003 Make sure config contains TOPIC before get it](https://issues.apache.org/jira/browse/STORM-2003)
When topic selector is not specified, KafkaBolt will get topic name from storm config . We should make sure the topic name is not null .
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/darionyaphet/storm STORM-2003
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/storm/pull/1590.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 #1590
----
commit db8802964ba492fcc0a81ce2bbf80075e954f64c
Author: darionyaphet <da...@gmail.com>
Date: 2016-07-25T14:26:35Z
STORM-2003 : Make sure config contains TOPIC before get it
----
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] storm pull request #1590: [STORM-2003] Make sure config contains TOPIC befor...
Posted by satishd <gi...@git.apache.org>.
Github user satishd commented on a diff in the pull request:
https://github.com/apache/storm/pull/1590#discussion_r72922977
--- Diff: external/storm-kafka/src/jvm/org/apache/storm/kafka/bolt/KafkaBolt.java ---
@@ -98,7 +98,11 @@ public void prepare(Map stormConf, TopologyContext context, OutputCollector coll
//for backward compatibility.
if(topicSelector == null) {
- this.topicSelector = new DefaultTopicSelector((String) stormConf.get(TOPIC));
+ if(stormConf.containsKey(TOPIC)) {
+ this.topicSelector = new DefaultTopicSelector((String) stormConf.get(TOPIC));
+ } else {
+ throw new IllegalArgumentException("topic select should be specified");
--- End diff --
@darionyaphet You may want to have exception's message like below.
`'topic' should be specified in bolt's configuration`
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] storm issue #1590: [STORM-2003] Make sure config contains TOPIC before get i...
Posted by harshach <gi...@git.apache.org>.
Github user harshach commented on the issue:
https://github.com/apache/storm/pull/1590
+1
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] storm pull request #1590: [STORM-2003] Make sure config contains TOPIC befor...
Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:
https://github.com/apache/storm/pull/1590
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] storm pull request #1590: [STORM-2003] Make sure config contains TOPIC befor...
Posted by darionyaphet <gi...@git.apache.org>.
Github user darionyaphet commented on a diff in the pull request:
https://github.com/apache/storm/pull/1590#discussion_r73194225
--- Diff: external/storm-kafka/src/jvm/org/apache/storm/kafka/bolt/KafkaBolt.java ---
@@ -98,7 +98,11 @@ public void prepare(Map stormConf, TopologyContext context, OutputCollector coll
//for backward compatibility.
if(topicSelector == null) {
- this.topicSelector = new DefaultTopicSelector((String) stormConf.get(TOPIC));
+ if(stormConf.containsKey(TOPIC)) {
+ this.topicSelector = new DefaultTopicSelector((String) stormConf.get(TOPIC));
+ } else {
+ throw new IllegalArgumentException("topic select should be specified");
--- End diff --
@satishd nice advice and fixed
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] storm issue #1590: [STORM-2003] Make sure config contains TOPIC before get i...
Posted by HeartSaVioR <gi...@git.apache.org>.
Github user HeartSaVioR commented on the issue:
https://github.com/apache/storm/pull/1590
+1
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---