[ 
https://issues.apache.org/jira/browse/STORM-1929?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15346842#comment-15346842
 ] 

ASF GitHub Bot commented on STORM-1929:
---------------------------------------

Github user revans2 commented on a diff in the pull request:

    https://github.com/apache/storm/pull/1515#discussion_r68280207
  
    --- Diff: storm-core/src/jvm/org/apache/storm/topology/TopologyBuilder.java 
---
    @@ -179,8 +188,13 @@ public BoltDeclarer setBolt(String id, IRichBolt bolt) 
throws IllegalArgumentExc
         public BoltDeclarer setBolt(String id, IRichBolt bolt, Number 
parallelism_hint) throws IllegalArgumentException {
             validateUnusedId(id);
             initCommon(id, bolt, parallelism_hint);
    -        _bolts.put(id, bolt);
    -        return new BoltGetter(id);
    +
    +        if (_bolts.containsKey(id)) {
    +            throw new IllegalArgumentException("Bolt " + id + " have 
existed");
    --- End diff --
    
    Can we say `"duplicate bolt id found " + id` instead?  I think it sounds a 
bit cleaner.


> Check when create topology
> --------------------------
>
>                 Key: STORM-1929
>                 URL: https://issues.apache.org/jira/browse/STORM-1929
>             Project: Apache Storm
>          Issue Type: Improvement
>          Components: storm-core
>    Affects Versions: 1.0.0, 1.0.1
>            Reporter: darion yaphet
>            Assignee: darion yaphet
>
> Add some check when create topology .
> 1. Spout and Bolt id shouldn't conflict
> 2. createTopology's spout and bolt set shouldn't empty .



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to