Search in sources :

Example 1 with BuilderUtility

use of com.twitter.heron.eco.builder.BuilderUtility in project incubator-heron by apache.

the class Eco method submit.

public void submit(FileInputStream fileInputStream, FileInputStream propertiesFile, boolean envFilter) throws Exception {
    EcoTopologyDefinition topologyDefinition = ecoParser.parseFromInputStream(fileInputStream, propertiesFile, envFilter);
    String topologyName = topologyDefinition.getName();
    Config topologyConfig = ecoBuilder.buildConfig(topologyDefinition);
    EcoExecutionContext executionContext = new EcoExecutionContext(topologyDefinition, topologyConfig);
    printTopologyInfo(executionContext);
    ObjectBuilder objectBuilder = new ObjectBuilder();
    objectBuilder.setBuilderUtility(new BuilderUtility());
    TopologyBuilder builder = ecoBuilder.buildTopologyBuilder(executionContext, objectBuilder);
    ecoSubmitter.submitTopology(topologyName, topologyConfig, builder.createTopology());
}
Also used : TopologyBuilder(org.apache.storm.topology.TopologyBuilder) Config(com.twitter.heron.api.Config) EcoExecutionContext(com.twitter.heron.eco.definition.EcoExecutionContext) EcoTopologyDefinition(com.twitter.heron.eco.definition.EcoTopologyDefinition) ObjectBuilder(com.twitter.heron.eco.builder.ObjectBuilder) BuilderUtility(com.twitter.heron.eco.builder.BuilderUtility)

Aggregations

Config (com.twitter.heron.api.Config)1 BuilderUtility (com.twitter.heron.eco.builder.BuilderUtility)1 ObjectBuilder (com.twitter.heron.eco.builder.ObjectBuilder)1 EcoExecutionContext (com.twitter.heron.eco.definition.EcoExecutionContext)1 EcoTopologyDefinition (com.twitter.heron.eco.definition.EcoTopologyDefinition)1 TopologyBuilder (org.apache.storm.topology.TopologyBuilder)1