Search in sources :

Example 1 with InvalidTopologyException

use of org.apache.heron.api.exception.InvalidTopologyException in project heron by twitter.

the class Runner 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();
    try {
        HeronSubmitter.submitTopology(name, config.getHeronConfig(), topologyBuilder.createTopology());
    } catch (AlreadyAliveException | InvalidTopologyException e) {
        e.printStackTrace();
    }
}
Also used : BuilderImpl(org.apache.heron.streamlet.impl.BuilderImpl) TopologyBuilder(org.apache.heron.api.topology.TopologyBuilder) InvalidTopologyException(org.apache.heron.api.exception.InvalidTopologyException) AlreadyAliveException(org.apache.heron.api.exception.AlreadyAliveException)

Aggregations

AlreadyAliveException (org.apache.heron.api.exception.AlreadyAliveException)1 InvalidTopologyException (org.apache.heron.api.exception.InvalidTopologyException)1 TopologyBuilder (org.apache.heron.api.topology.TopologyBuilder)1 BuilderImpl (org.apache.heron.streamlet.impl.BuilderImpl)1