8000 storm/docs/Hooks.md at 1.x-branch · alexlehm/storm · GitHub
[go: up one dir, main page]

Skip to content

Latest commit

 

History

History
9 lines (8 loc) · 849 Bytes

Hooks.md

File metadata and controls

9 lines (8 loc) · 849 Bytes
title Hooks
layout documentation
documentation true

Storm provides hooks with which you can insert custom code to run on any number of events within Storm. You create a hook by extending the BaseTaskHook class and overriding the appropriate method for the event you 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 method.
  2. Through the Storm configuration using the "topology.auto.task.hooks" config. These hooks are automatically registered in every spout or bolt, and are useful for doing things like integrating with a custom monitoring system.
0