Search in sources :

Example 1 with OutputCollector

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();
}
Also used : OutputCollector(com.twitter.heron.api.bolt.OutputCollector) TopologyContextImpl(com.twitter.heron.common.utils.topology.TopologyContextImpl)

Example 2 with OutputCollector

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);
}
Also used : IOutputCollector(com.twitter.heron.api.bolt.IOutputCollector) OutputCollector(com.twitter.heron.api.bolt.OutputCollector)

Aggregations

OutputCollector (com.twitter.heron.api.bolt.OutputCollector)2 IOutputCollector (com.twitter.heron.api.bolt.IOutputCollector)1 TopologyContextImpl (com.twitter.heron.common.utils.topology.TopologyContextImpl)1