Class InstanceExecutor
- java.lang.Object
-
- org.apache.heron.simulator.executors.InstanceExecutor
-
- All Implemented Interfaces:
Runnable
public class InstanceExecutor extends Object implements Runnable
InstanceExecutor helps to group all necessary resources for an instance into a class and, provide methods to access these resources externally.It helps uniform the ways to access instance resources
-
-
Field Summary
Fields Modifier and Type Field Description static int
CAPACITY
static double
CURRENT_SAMPLE_WEIGHT
-
Constructor Summary
Constructors Constructor Description InstanceExecutor(org.apache.heron.proto.system.PhysicalPlans.PhysicalPlan physicalPlan, String instanceId)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
activate()
protected org.apache.heron.instance.IInstance
createInstance()
protected org.apache.heron.common.utils.misc.PhysicalPlanHelper
createPhysicalPlanHelper(org.apache.heron.proto.system.PhysicalPlans.PhysicalPlan physicalPlan, String instanceId, org.apache.heron.common.utils.metrics.MetricsCollector metricsCollector)
void
deactivate()
String
getComponentName()
String
getInstanceId()
org.apache.heron.common.basics.Communicator<org.apache.heron.proto.system.Metrics.MetricPublisherPublishMessage>
getMetricsOutQueue()
org.apache.heron.common.basics.Communicator<com.google.protobuf.Message>
getStreamInQueue()
org.apache.heron.common.basics.Communicator<com.google.protobuf.Message>
getStreamOutQueue()
int
getTaskId()
protected void
handleControlSignal()
protected void
initInstanceManager()
void
run()
void
stop()
-
-
-
Field Detail
-
CAPACITY
public static final int CAPACITY
- See Also:
- Constant Field Values
-
CURRENT_SAMPLE_WEIGHT
public static final double CURRENT_SAMPLE_WEIGHT
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
InstanceExecutor
public InstanceExecutor(org.apache.heron.proto.system.PhysicalPlans.PhysicalPlan physicalPlan, String instanceId)
-
-
Method Detail
-
getStreamInQueue
public org.apache.heron.common.basics.Communicator<com.google.protobuf.Message> getStreamInQueue()
-
getStreamOutQueue
public org.apache.heron.common.basics.Communicator<com.google.protobuf.Message> getStreamOutQueue()
-
getMetricsOutQueue
public org.apache.heron.common.basics.Communicator<org.apache.heron.proto.system.Metrics.MetricPublisherPublishMessage> getMetricsOutQueue()
-
getInstanceId
public String getInstanceId()
-
getComponentName
public String getComponentName()
-
getTaskId
public int getTaskId()
-
createInstance
protected org.apache.heron.instance.IInstance createInstance()
-
createPhysicalPlanHelper
protected org.apache.heron.common.utils.misc.PhysicalPlanHelper createPhysicalPlanHelper(org.apache.heron.proto.system.PhysicalPlans.PhysicalPlan physicalPlan, String instanceId, org.apache.heron.common.utils.metrics.MetricsCollector metricsCollector)
-
initInstanceManager
protected void initInstanceManager()
-
handleControlSignal
protected void handleControlSignal()
-
stop
public void stop()
-
activate
public void activate()
-
deactivate
public void deactivate()
-
-