Apache Storm Multilang: Purpose of ReadTasksIds -


i have been attempting use storm's multilang protocol project. i've read through protocol , part makes sense. looking on python multilang source code i've noticed in emit method after emitting tuple, calls readtaskids() method.

def emit(*args, **kwargs):     __emit(*args, **kwargs)     return readtaskids() 

on concepts page, mentions using directgrouping() able send output specific task. , lines 124-129 of jsonserializer (which handles multilang communication) it's checking see if "need_task_ids" field present , not send taskids if it's defined false in json.

so i'm wondering if can explain/confirm me why storm needs tasksids? there's nothing in multilang protocol mentions it. use case of wanting send tuples specific task using directgrouping()? or there benefit having it? adding "need_task_ids" field in json pretty easy stop happening (if understand correctly), don't know if there downsides in doing that?

i not familiar multilang protocol. however, explanation meets experience in using storm's low level java api. in api, either specify task-ids in case of direct stream or no task-ids in case of other groupings (eg, shuffle, field, all). thus, claim own explanation correct. know internal clojure code same thing: checks if task ids provided. if not, looks specified connection pattern, computes task-ids, , returns them user code after sending tuples.


Comments

Popular posts from this blog

html - Firefox flex bug applied to buttons? -

html - Missing border-right in select on Firefox -

c# - two queries in same method -