use of org.apache.heron.resource.TestBolt in project heron by twitter.
the class SpoutStatefulInstanceTest method buildPhysicalPlanMessage.
private InstanceControlMsg buildPhysicalPlanMessage(IRichSpout spout) {
PhysicalPlans.PhysicalPlan physicalPlan = MockPhysicalPlansBuilder.newBuilder().withTopologyConfig(Config.TopologyReliabilityMode.EFFECTIVELY_ONCE, -1).withTopologyState(TopologyAPI.TopologyState.RUNNING).withSpoutInstance("test-spout", 0, "spout-id", spout).withBoltInstance("test-bolt", 1, "bolt-id", "test-spout", new TestBolt()).build();
PhysicalPlanHelper ph = new PhysicalPlanHelper(physicalPlan, "spout-id");
return InstanceControlMsg.newBuilder().setNewPhysicalPlanHelper(ph).build();
}
use of org.apache.heron.resource.TestBolt in project heron by twitter.
the class CustomGroupingTest method initBoltA.
@Override
protected void initBoltA(TopologyBuilder topologyBuilder, String boltId, String upstreamComponentId) {
final CustomStreamGrouping myCustomGrouping = new MyRoundRobinCustomGrouping(getInitInfoKey(upstreamComponentId));
topologyBuilder.setBolt(boltId, new TestBolt(), 1).customGrouping(upstreamComponentId, myCustomGrouping);
}
Aggregations