You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@storm.apache.org by "James Xu (JIRA)" <ji...@apache.org> on 2013/12/15 04:15:06 UTC

[jira] [Created] (STORM-121) A hook should be able to modify a tuple

James Xu created STORM-121:
------------------------------

             Summary: A hook should be able to modify a tuple
                 Key: STORM-121
                 URL: https://issues.apache.org/jira/browse/STORM-121
             Project: Apache Storm (Incubating)
          Issue Type: New Feature
            Reporter: James Xu
            Priority: Minor


https://github.com/nathanmarz/storm/issues/534

High level:

I should be able to add a field like “_trace” using a hook and have it be passed through the topology without having to change the rest of the topology. In this way a record can be followed through the topology and information about it’s process can be extracted.

Want:

https://github.com/maphysics/storm-starter/blob/trace_injector/src/jvm/storm/starter/ReverseStringTopology.java 
In the example topology linked above (which is on my fork of storm starter), the hook is looking for a field called _trace containing a hashmap. The idea is that somewhere in the topology that field is turned on and a hashmap is put in containing some basic starting information. In my example that was done in the spout and all the bolts emit an _trace field but really we want to be able to touch one bolt and add the field when a particular requirement is met. Then that field will continue with the record even when the OutputFieldsDeclarer does not have _trace as a field so that one does not have to edit each of the subsequential bolts.

(This might be actually a how-to and not a bug in which case let me know and I’ll send it to the mailing list.)

/cc @mrflip



--
This message was sent by Atlassian JIRA
(v6.1.4#6159)