use of com.twitter.heron.api.bolt.OutputCollector in project heron by twitter.
the class BoltInstance method start.
@Override
public void start() {
TopologyContextImpl topologyContext = helper.getTopologyContext();
// Initialize the GlobalMetrics
GlobalMetrics.init(topologyContext, systemConfig.getHeronMetricsExportIntervalSec());
boltMetrics.registerMetrics(topologyContext);
// Delegate
bolt.prepare(topologyContext.getTopologyConfig(), topologyContext, new OutputCollector(collector));
// Invoke user-defined prepare task hook
topologyContext.invokeHookPrepare();
// Init the CustomStreamGrouping
helper.prepareForCustomStreamGrouping();
addBoltTasks();
}
use of com.twitter.heron.api.bolt.OutputCollector in project heron by twitter.
the class IntegrationTestBolt method prepare.
@Override
public void prepare(Map<String, Object> map, TopologyContext context, OutputCollector outputCollector) {
update(context);
this.collector = new OutputCollector(new IntegrationTestBoltCollector(outputCollector));
this.delegateBolt.prepare(map, context, collector);
}
Aggregations