use of org.apache.heron.eco.definition.ObjectDefinition in project heron by twitter.
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);
}
}
use of org.apache.heron.eco.definition.ObjectDefinition in project heron by twitter.
the class BoltBuilder method buildBolts.
public 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 org.apache.heron.eco.definition.ObjectDefinition in project heron by twitter.
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