public final class RuntimeMaster extends Object
PhysicalPlan
to Runtime Master to execute a job.
Runtime Master handles:
a) Scheduling the job with Scheduler
, SchedulerRunner
, PendingTaskGroupQueue
.
b) Managing resources with ContainerManager
.
c) Managing blocks with BlockManagerMaster
.
d) Receiving and sending control messages with MessageEnvironment
.
e) Metric using MetricMessageHandler
.Modifier and Type | Class and Description |
---|---|
class |
RuntimeMaster.MasterControlMessageReceiver
Handler for control messages received by Master.
|
Constructor and Description |
---|
RuntimeMaster(Scheduler scheduler,
SchedulerRunner schedulerRunner,
PendingTaskGroupQueue pendingTaskGroupQueue,
ContainerManager containerManager,
BlockManagerMaster blockManagerMaster,
MetricMessageHandler metricMessageHandler,
MessageEnvironment masterMessageEnvironment,
String dagDirectory) |
Modifier and Type | Method and Description |
---|---|
void |
accumulateBarrierMetric(List<Long> blockSizeInfo,
String srcVertexId,
String blockId)
Accumulates the metric data for a barrier vertex.
|
static edu.snu.coral.runtime.common.comm.ControlMessage.BlockStateFromExecutor |
convertBlockState(BlockState.State state) |
static BlockState.State |
convertBlockState(edu.snu.coral.runtime.common.comm.ControlMessage.BlockStateFromExecutor state) |
void |
execute(PhysicalPlan plan,
int maxScheduleAttempt)
Submits the
PhysicalPlan to Runtime. |
void |
onContainerAllocated(String executorId,
org.apache.reef.driver.evaluator.AllocatedEvaluator allocatedEvaluator,
org.apache.reef.tang.Configuration executorConfiguration)
Called when a container is allocated for this runtime.
|
void |
onExecutorFailed(String failedExecutorId)
Called when an executor fails due to container failure on this runtime.
|
boolean |
onExecutorLaunched(org.apache.reef.driver.context.ActiveContext activeContext)
Called when an executor is launched on a container for this runtime.
|
void |
requestContainer(String resourceSpecificationString) |
void |
terminate() |
@Inject public RuntimeMaster(Scheduler scheduler, SchedulerRunner schedulerRunner, PendingTaskGroupQueue pendingTaskGroupQueue, ContainerManager containerManager, BlockManagerMaster blockManagerMaster, MetricMessageHandler metricMessageHandler, MessageEnvironment masterMessageEnvironment, String dagDirectory)
public void execute(PhysicalPlan plan, int maxScheduleAttempt)
PhysicalPlan
to Runtime.plan
- to execute.maxScheduleAttempt
- the max number of times this plan/sub-part of the plan should be attempted.public void terminate()
public void requestContainer(String resourceSpecificationString)
public void onContainerAllocated(String executorId, org.apache.reef.driver.evaluator.AllocatedEvaluator allocatedEvaluator, org.apache.reef.tang.Configuration executorConfiguration)
ContainerManager
.executorId
- to use for the executor to be launched on this container.allocatedEvaluator
- to be used as the container.executorConfiguration
- to use for the executor to be launched on this container.public boolean onExecutorLaunched(org.apache.reef.driver.context.ActiveContext activeContext)
activeContext
- of the launched executor.public void onExecutorFailed(String failedExecutorId)
failedExecutorId
- of the failed executor.public void accumulateBarrierMetric(List<Long> blockSizeInfo, String srcVertexId, String blockId)
blockSizeInfo
- the block size info to accumulate.srcVertexId
- the ID of the source vertex.blockId
- the ID of the block.public static BlockState.State convertBlockState(edu.snu.coral.runtime.common.comm.ControlMessage.BlockStateFromExecutor state)
public static edu.snu.coral.runtime.common.comm.ControlMessage.BlockStateFromExecutor convertBlockState(BlockState.State state)
Copyright © 2018. All rights reserved.