use of com.twitter.heron.eco.definition.ObjectDefinition in project incubator-heron by apache.
the class BoltBuilder method buildBolts.
protected void buildBolts(EcoExecutionContext executionContext, ObjectBuilder objectBuilder) throws IllegalAccessException, InstantiationException, ClassNotFoundException, NoSuchFieldException, InvocationTargetException {
EcoTopologyDefinition topologyDefinition = executionContext.getTopologyDefinition();
for (ObjectDefinition def : topologyDefinition.getBolts()) {
Object obj = objectBuilder.buildObject(def, executionContext);
executionContext.addBolt(def.getId(), obj);
}
}
use of com.twitter.heron.eco.definition.ObjectDefinition in project incubator-heron by apache.
the class SpoutBuilder method buildSpouts.
protected void buildSpouts(EcoExecutionContext executionContext, TopologyBuilder builder, ObjectBuilder objectBuilder) throws ClassNotFoundException, InstantiationException, IllegalAccessException, NoSuchFieldException, InvocationTargetException {
EcoTopologyDefinition topologyDefinition = executionContext.getTopologyDefinition();
for (ObjectDefinition def : topologyDefinition.getSpouts()) {
Object obj = objectBuilder.buildObject(def, executionContext);
builder.setSpout(def.getId(), (IRichSpout) obj, def.getParallelism());
executionContext.addSpout(def.getId(), obj);
}
}
Aggregations