Search in sources :

Example 1 with ContextImpl

use of org.apache.heron.streamlet.impl.ContextImpl in project heron by twitter.

the class ComplexSource method open.

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

Example 2 with ContextImpl

use of org.apache.heron.streamlet.impl.ContextImpl in project heron by twitter.

the class TransformOperator method prepare.

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

Example 3 with ContextImpl

use of org.apache.heron.streamlet.impl.ContextImpl in project heron by twitter.

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 : TopologyContext(org.apache.heron.api.topology.TopologyContext) Context(org.apache.heron.streamlet.Context) ContextImpl(org.apache.heron.streamlet.impl.ContextImpl)

Aggregations

TopologyContext (org.apache.heron.api.topology.TopologyContext)3 Context (org.apache.heron.streamlet.Context)3 ContextImpl (org.apache.heron.streamlet.impl.ContextImpl)3