public class BaseWorkerHook extends Object implements IWorkerHook, Serializable
A BaseWorkerHook is a noop implementation of IWorkerHook. You may extends this class and implement any and/or all methods you need for your workers.
Constructor and Description |
---|
BaseWorkerHook() |
Modifier and Type | Method and Description |
---|---|
void |
shutdown()
This method is called right before a worker shuts down
|
void |
start(Map<String,Object> topoConf,
WorkerTopologyContext context)
This method is called when a worker is started
|
public void start(Map<String,Object> topoConf, WorkerTopologyContext context)
This method is called when a worker is started
start
in interface IWorkerHook
topoConf
- The Storm configuration for this workercontext
- This object can be used to get information about this worker’s place within the topologypublic void shutdown()
This method is called right before a worker shuts down
shutdown
in interface IWorkerHook
Copyright © 2019 The Apache Software Foundation. All rights reserved.