Search in sources :

Example 1 with Context

use of com.twitter.heron.streamlet.Context in project incubator-heron by apache.

the class ComplexSource method open.

@SuppressWarnings("rawtypes")
@Override
public void open(Map<String, Object> map, TopologyContext topologyContext, SpoutOutputCollector outputCollector) {
    collector = outputCollector;
    Context context = new ContextImpl(topologyContext, map, state);
    generator.setup(context);
}
Also used : Context(com.twitter.heron.streamlet.Context) TopologyContext(com.twitter.heron.api.topology.TopologyContext) ContextImpl(com.twitter.heron.streamlet.impl.ContextImpl)

Example 2 with Context

use of com.twitter.heron.streamlet.Context in project incubator-heron by apache.

the class TransformOperator method prepare.

@SuppressWarnings("rawtypes")
@Override
public void prepare(Map<String, Object> map, TopologyContext topologyContext, OutputCollector outputCollector) {
    collector = outputCollector;
    Context context = new ContextImpl(topologyContext, map, state);
    serializableTransformer.setup(context);
}
Also used : Context(com.twitter.heron.streamlet.Context) TopologyContext(com.twitter.heron.api.topology.TopologyContext) ContextImpl(com.twitter.heron.streamlet.impl.ContextImpl)

Example 3 with Context

use of com.twitter.heron.streamlet.Context in project incubator-heron by apache.

the class ComplexSink method prepare.

@SuppressWarnings("rawtypes")
@Override
public void prepare(Map<String, Object> map, TopologyContext topologyContext, OutputCollector outputCollector) {
    this.collector = outputCollector;
    Context context = new ContextImpl(topologyContext, map, state);
    sink.setup(context);
}
Also used : Context(com.twitter.heron.streamlet.Context) TopologyContext(com.twitter.heron.api.topology.TopologyContext) ContextImpl(com.twitter.heron.streamlet.impl.ContextImpl)

Aggregations

TopologyContext (com.twitter.heron.api.topology.TopologyContext)3 Context (com.twitter.heron.streamlet.Context)3 ContextImpl (com.twitter.heron.streamlet.impl.ContextImpl)3