use of org.apache.heron.common.utils.misc.PhysicalPlanHelper in project heron by twitter.
the class ActivateDeactivateTest method buildMessage.
private InstanceControlMsg buildMessage(TopologyAPI.TopologyState state) {
PhysicalPlans.PhysicalPlan physicalPlan = UnitTestHelper.getPhysicalPlan(true, -1, state);
PhysicalPlanHelper physicalPlanHelper = new PhysicalPlanHelper(physicalPlan, SPOUT_INSTANCE_ID);
return InstanceControlMsg.newBuilder().setNewPhysicalPlanHelper(physicalPlanHelper).build();
}
use of org.apache.heron.common.utils.misc.PhysicalPlanHelper 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.common.utils.misc.PhysicalPlanHelper 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();
}
use of org.apache.heron.common.utils.misc.PhysicalPlanHelper in project heron by twitter.
the class SpoutInstanceTest method initSpout.
private static void initSpout(ExecutorTester executorTester, boolean ackEnabled, int timeout) {
PhysicalPlans.PhysicalPlan physicalPlan = UnitTestHelper.getPhysicalPlan(ackEnabled, timeout);
PhysicalPlanHelper physicalPlanHelper = new PhysicalPlanHelper(physicalPlan, SPOUT_INSTANCE_ID);
executorTester.getInControlQueue().offer(InstanceControlMsg.newBuilder().setNewPhysicalPlanHelper(physicalPlanHelper).build());
}
use of org.apache.heron.common.utils.misc.PhysicalPlanHelper in project heron by twitter.
the class InstanceExecutor method createPhysicalPlanHelper.
protected PhysicalPlanHelper createPhysicalPlanHelper(PhysicalPlans.PhysicalPlan physicalPlan, String instanceId, MetricsCollector metricsCollector) {
PhysicalPlanHelper localPhysicalPlanHelper = new PhysicalPlanHelper(physicalPlan, instanceId);
// Bind the MetricsCollector with topologyContext
localPhysicalPlanHelper.setTopologyContext(metricsCollector);
return localPhysicalPlanHelper;
}
Aggregations