flink-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "fangfengbin (JIRA)" <j...@apache.org>
Subject [jira] [Created] (FLINK-2571) Add task hooks support in Storm-compatibility
Date Tue, 25 Aug 2015 12:32:46 GMT
fangfengbin created FLINK-2571:

             Summary: Add task hooks support in Storm-compatibility 
                 Key: FLINK-2571
                 URL: https://issues.apache.org/jira/browse/FLINK-2571
             Project: Flink
          Issue Type: New Feature
          Components: flink-contrib
    Affects Versions: 0.8.1
            Reporter: fangfengbin
            Assignee: fangfengbin

Storm provides hooks with which users can insert custom code to run on any number of events(emit,
cleanup, spoutAck...) within Storm. Users create a hook by extending the BaseTaskHook class
and overriding the appropriate method for the event users want to catch. 
There are two ways to register your hook:
1.In the open method of your spout or prepare method of your bolt using the TopologyContext#addTaskHook
2.Through the Storm configuration using the "topology.auto.task.hooks" config.You can use
user-defined hooks class names as value of "topology.auto.task.hooks" .These hooks are automatically
registered in every spout or bolt.

When the events happen, it will get hooks-list from TopologyContext and call hooks function.

This message was sent by Atlassian JIRA

View raw message