Search in sources :

Example 1 with TestSpout

use of org.apache.heron.resource.TestSpout in project heron by twitter.

the class BoltStatefulInstanceTest method buildPhysicalPlanMessage.

private InstanceControlMsg buildPhysicalPlanMessage(IRichBolt bolt) {
    PhysicalPlans.PhysicalPlan physicalPlan = MockPhysicalPlansBuilder.newBuilder().withTopologyConfig(Config.TopologyReliabilityMode.EFFECTIVELY_ONCE, -1).withTopologyState(TopologyAPI.TopologyState.RUNNING).withSpoutInstance("test-spout", 0, "spout-id", new TestSpout()).withBoltInstance("test-bolt", 1, "bolt-id", "test-spout", bolt).build();
    PhysicalPlanHelper ph = new PhysicalPlanHelper(physicalPlan, "bolt-id");
    return InstanceControlMsg.newBuilder().setNewPhysicalPlanHelper(ph).build();
}
Also used : PhysicalPlanHelper(org.apache.heron.common.utils.misc.PhysicalPlanHelper) PhysicalPlans(org.apache.heron.proto.system.PhysicalPlans) TestSpout(org.apache.heron.resource.TestSpout)

Example 2 with TestSpout

use of org.apache.heron.resource.TestSpout in project heron by twitter.

the class StreamletImplTest method testSpoutStreamlet.

@Test
public void testSpoutStreamlet() {
    TestSpout spout = new TestSpout();
    Streamlet<Double> streamlet = builder.newSource(spout);
    assertTrue(streamlet instanceof SpoutStreamlet);
}
Also used : SpoutStreamlet(org.apache.heron.streamlet.impl.streamlets.SpoutStreamlet) TestSpout(org.apache.heron.resource.TestSpout) Test(org.junit.Test)

Aggregations

TestSpout (org.apache.heron.resource.TestSpout)2 PhysicalPlanHelper (org.apache.heron.common.utils.misc.PhysicalPlanHelper)1 PhysicalPlans (org.apache.heron.proto.system.PhysicalPlans)1 SpoutStreamlet (org.apache.heron.streamlet.impl.streamlets.SpoutStreamlet)1 Test (org.junit.Test)1