You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@storm.apache.org by satishd <gi...@git.apache.org> on 2016/08/01 04:32:10 UTC

[GitHub] storm pull request #1590: [STORM-2003] Make sure config contains TOPIC befor...

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.
---