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

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

Github user HeartSaVioR commented on the pull request:

    https://github.com/apache/storm/pull/525#issuecomment-94241652
  
    It also runs well with complex DAG, 
    ```
    1 - 2 - 3 - 5
          \ 4 /
    ```
    
    ```
    {
       "task->component":{
          "24":"__acker",
          "25":"__acker",
          "20":"__acker",
          "21":"__acker",
          "22":"__acker",
          "23":"__acker",
          "1":"1",
          "3":"3",
          "2":"2",
          "5":"5",
          "4":"4",
          "7":"__acker",
          "6":"__acker",
          "9":"__acker",
          "8":"__acker",
          "11":"__acker",
          "10":"__acker",
          "13":"__acker",
          "12":"__acker",
          "15":"__acker",
          "14":"__acker",
          "17":"__acker",
          "16":"__acker",
          "19":"__acker",
          "18":"__acker"
       },
       "stream->target->grouping":{
          "default":{
             "2":"SHUFFLE"
          }
       },
       "streams":[
          "default"
       ],
       "stream->outputfields":{
          "default":[
             "word"
          ]
       },
       "taskid":1,
       "source->stream->grouping":{
    
       },
       "componentid":"1"
    }
    ```
    
    ```
    {
       "task->component":{
          "24":"__acker",
          "25":"__acker",
          "20":"__acker",
          "21":"__acker",
          "22":"__acker",
          "23":"__acker",
          "1":"1",
          "3":"3",
          "2":"2",
          "5":"5",
          "4":"4",
          "7":"__acker",
          "6":"__acker",
          "9":"__acker",
          "8":"__acker",
          "11":"__acker",
          "10":"__acker",
          "13":"__acker",
          "12":"__acker",
          "15":"__acker",
          "14":"__acker",
          "17":"__acker",
          "16":"__acker",
          "19":"__acker",
          "18":"__acker"
       },
       "stream->target->grouping":{
          "default":{
             "3":"LOCAL_OR_SHUFFLE",
             "4":"LOCAL_OR_SHUFFLE"
          }
       },
       "streams":[
          "default"
       ],
       "stream->outputfields":{
          "default":[
             "word"
          ]
       },
       "taskid":2,
       "source->stream->grouping":{
          "1":{
             "default":"SHUFFLE"
          }
       },
       "componentid":"2"
    }
    ```
    
    ```
    {
       "task->component":{
          "24":"__acker",
          "25":"__acker",
          "20":"__acker",
          "21":"__acker",
          "22":"__acker",
          "23":"__acker",
          "1":"1",
          "3":"3",
          "2":"2",
          "5":"5",
          "4":"4",
          "7":"__acker",
          "6":"__acker",
          "9":"__acker",
          "8":"__acker",
          "11":"__acker",
          "10":"__acker",
          "13":"__acker",
          "12":"__acker",
          "15":"__acker",
          "14":"__acker",
          "17":"__acker",
          "16":"__acker",
          "19":"__acker",
          "18":"__acker"
       },
       "stream->target->grouping":{
          "default":{
             "5":"ALL"
          }
       },
       "streams":[
          "default"
       ],
       "stream->outputfields":{
          "default":[
             "word"
          ]
       },
       "taskid":3,
       "source->stream->grouping":{
          "2":{
             "default":"LOCAL_OR_SHUFFLE"
          }
       },
       "componentid":"3"
    }
    ```
    
    ```
    {
       "task->component":{
          "24":"__acker",
          "25":"__acker",
          "20":"__acker",
          "21":"__acker",
          "22":"__acker",
          "23":"__acker",
          "1":"1",
          "3":"3",
          "2":"2",
          "5":"5",
          "4":"4",
          "7":"__acker",
          "6":"__acker",
          "9":"__acker",
          "8":"__acker",
          "11":"__acker",
          "10":"__acker",
          "13":"__acker",
          "12":"__acker",
          "15":"__acker",
          "14":"__acker",
          "17":"__acker",
          "16":"__acker",
          "19":"__acker",
          "18":"__acker"
       },
       "stream->target->grouping":{
          "default":{
             "5":"SHUFFLE"
          }
       },
       "streams":[
          "default"
       ],
       "stream->outputfields":{
          "default":[
             "word"
          ]
       },
       "taskid":4,
       "source->stream->grouping":{
          "2":{
             "default":"LOCAL_OR_SHUFFLE"
          }
       },
       "componentid":"4"
    }
    ```
    
    ```
    {
       "task->component":{
          "24":"__acker",
          "25":"__acker",
          "20":"__acker",
          "21":"__acker",
          "22":"__acker",
          "23":"__acker",
          "1":"1",
          "3":"3",
          "2":"2",
          "5":"5",
          "4":"4",
          "7":"__acker",
          "6":"__acker",
          "9":"__acker",
          "8":"__acker",
          "11":"__acker",
          "10":"__acker",
          "13":"__acker",
          "12":"__acker",
          "15":"__acker",
          "14":"__acker",
          "17":"__acker",
          "16":"__acker",
          "19":"__acker",
          "18":"__acker"
       },
       "stream->target->grouping":{
    
       },
       "streams":[
          "default"
       ],
       "stream->outputfields":{
          "default":[
             "word"
          ]
       },
       "taskid":5,
       "source->stream->grouping":{
          "3":{
             "default":"ALL"
          },
          "4":{
             "default":"SHUFFLE"
          }
       },
       "componentid":"5"
    }
    ```


> Enhance topology context sent to multi-lang bolts and spouts
> ------------------------------------------------------------
>
>                 Key: STORM-789
>                 URL: https://issues.apache.org/jira/browse/STORM-789
>             Project: Apache Storm
>          Issue Type: Improvement
>            Reporter: Dan Blanchard
>            Assignee: Dan Blanchard
>
> I'm about to submit a pull request that adds a lot more contextual 
> information to the "context" JSON dictionary that gets sent to multi-lang 
> bolts and spouts as part of their initial handshake.  These additions will 
> make is so non-JVM developers have access to the sources, targets, and field 
> names for their bolts and spouts.  
> We will add support for this in streamparse (one of the more popular Python 
> libraries for Storm) as soon as this gets merged in.
> Here are the details of what I've added:
> -  componentid: the component ID for this task, so you don't have to look it 
> up
>                 in "task->component" by "taskid"
> -  streams: a list of all of the streams for this task
> -  stream->outputfields:  a mapping from stream names to output fields for 
> that
>                           stream
> -  stream->target->grouping: a mapping from stream names to the targets for 
> this
>                              task to the kind of grouping they use.
> -  sources->grouping:  a mapping from the component IDs of the sources to 
> their
>                        grouping.
> Note on groupings:  groupings are either represented as a string (e.g., 
> "SHUFFLE") or a list of strings for field groupings.



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

Reply via email to