public class ProcessBolt extends AbstractBolt
This bolt implementation wraps a process configuration and creates the process including its inner element to provide a bolt that behaves the same as a regular streams process.
TODO: Currently, services are not injected into bolts as there is no service facade implementation for storm, yet.
| Modifier and Type | Class and Description |
|---|---|
class |
ProcessBolt.DataForwarder |
class |
ProcessBolt.OutputRef |
| Modifier and Type | Field and Description |
|---|---|
protected String[] |
outputs |
protected Variables |
variables |
output, uuid, xmlConfig| Constructor and Description |
|---|
ProcessBolt(String xmlConfig,
String uuid,
Map<String,String> variables)
The bolt implementation requires an XML configuration (the complete
container XML as string) and the ID that identifies the corresponding
process within that XML.
|
| Modifier and Type | Method and Description |
|---|---|
protected ProcessorList |
createProcess()
This method creates the inner processors of this process bolt.
|
protected Processor |
createProcessor(Element el,
ProcessorFactory pf) |
void |
execute(backtype.storm.tuple.Tuple input) |
List<Processor> |
getAllProcessors() |
protected List<Processor> |
getAllProcessors(ProcessorList list) |
void |
prepare(Map stormConf,
backtype.storm.task.TopologyContext context,
backtype.storm.task.OutputCollector collector) |
declareOutputFieldspublic ProcessBolt(String xmlConfig, String uuid, Map<String,String> variables) throws Exception
xmlConfig - The XML configuration as String.uuid - The ID of the process.Exceptionprotected ProcessorList createProcess() throws Exception
Exceptionprotected List<Processor> getAllProcessors(ProcessorList list)
protected Processor createProcessor(Element el, ProcessorFactory pf) throws Exception
Exceptionpublic void prepare(Map stormConf, backtype.storm.task.TopologyContext context, backtype.storm.task.OutputCollector collector)
IBolt.prepare(java.util.Map,
backtype.storm.task.TopologyContext,
backtype.storm.task.OutputCollector)public void execute(backtype.storm.tuple.Tuple input)
IBolt.execute(backtype.storm.tuple.Tuple)Copyright © 2013. All Rights Reserved.