Search in sources :

Example 6 with BuilderImpl

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

the class SimulatorRunner method run.

/**
 * Runs the computation
 * @param name The name of the topology
 * @param config Any config that is passed to the topology
 * @param builder The builder used to keep track of the sources.
 */
public void run(String name, Config config, Builder builder) {
    BuilderImpl bldr = (BuilderImpl) builder;
    TopologyBuilder topologyBuilder = bldr.build();
    Simulator simulator = new Simulator();
    simulator.submitTopology(name, config.getHeronConfig(), topologyBuilder.createTopology());
}
Also used : BuilderImpl(org.apache.heron.streamlet.impl.BuilderImpl) TopologyBuilder(org.apache.heron.api.topology.TopologyBuilder)

Aggregations

BuilderImpl (org.apache.heron.streamlet.impl.BuilderImpl)6 MalformedURLException (java.net.MalformedURLException)4 Config (org.apache.heron.api.Config)4 AbstractTestTopology (org.apache.heron.integration_test.common.AbstractTestTopology)4 TestTopologyBuilder (org.apache.heron.integration_test.core.TestTopologyBuilder)4 Builder (org.apache.heron.streamlet.Builder)4 Streamlet (org.apache.heron.streamlet.Streamlet)3 Arrays (java.util.Arrays)2 HashSet (java.util.HashSet)2 Set (java.util.Set)2 AtomicInteger (java.util.concurrent.atomic.AtomicInteger)2 TopologyBuilder (org.apache.heron.api.topology.TopologyBuilder)2 HashMap (java.util.HashMap)1 List (java.util.List)1 Map (java.util.Map)1 Consumer (java.util.function.Consumer)1 AlreadyAliveException (org.apache.heron.api.exception.AlreadyAliveException)1 InvalidTopologyException (org.apache.heron.api.exception.InvalidTopologyException)1 Context (org.apache.heron.streamlet.Context)1 SerializableFunction (org.apache.heron.streamlet.SerializableFunction)1