Search in sources :

Example 1 with TopologyTestTopologyBuilder

use of org.apache.heron.integration_topology_test.core.TopologyTestTopologyBuilder in project heron by twitter.

the class AbstractTestTopology method submit.

public final void submit(Config userConf) throws AlreadyAliveException, InvalidTopologyException {
    Config conf = buildConfig(new BasicConfig());
    if (userConf != null) {
        conf.putAll(userConf);
    }
    if (this.httpServerResultsUrl == null) {
        TopologyBuilder builder = new TopologyBuilder();
        HeronSubmitter.submitTopology(topologyName, conf, buildTopology(builder).createTopology());
    } else {
        TopologyTestTopologyBuilder builder = new TopologyTestTopologyBuilder(httpServerResultsUrl);
        conf.setTopologyReliabilityMode(Config.TopologyReliabilityMode.EFFECTIVELY_ONCE);
        conf.setTopologyStatefulCheckpointIntervalSecs(CHECKPOINT_INTERVAL);
        HeronSubmitter.submitTopology(topologyName, conf, buildStatefulTopology(builder).createTopology());
    }
}
Also used : TopologyTestTopologyBuilder(org.apache.heron.integration_topology_test.core.TopologyTestTopologyBuilder) TopologyBuilder(org.apache.heron.api.topology.TopologyBuilder) Config(org.apache.heron.api.Config) TopologyTestTopologyBuilder(org.apache.heron.integration_topology_test.core.TopologyTestTopologyBuilder)

Aggregations

Config (org.apache.heron.api.Config)1 TopologyBuilder (org.apache.heron.api.topology.TopologyBuilder)1 TopologyTestTopologyBuilder (org.apache.heron.integration_topology_test.core.TopologyTestTopologyBuilder)1