public class TaskMonitor extends Object implements akka.actor.Actor, akka.actor.FSM<TaskMonitor.TaskMonitorState,TaskMonitor.StateData>
Models a task with a state machine reflecting the perceived state of the task in Mesos. The state is primarily updated when task status information arrives from Mesos.
The associated state data primarily tracks the task's goal (intended) state, as persisted by the scheduler. Keep in mind that goal state is persisted before actions are taken. The goal state strictly transitions thru New->Launched->Released.
Unlike most exchanges with Mesos, task status is delivered at-least-once, so status handling should be idempotent.
Modifier and Type | Class and Description |
---|---|
static class |
TaskMonitor.Killing$ |
static class |
TaskMonitor.Launched |
static class |
TaskMonitor.Launched$ |
static class |
TaskMonitor.New |
static class |
TaskMonitor.New$ |
static class |
TaskMonitor.Reconciling$ |
static class |
TaskMonitor.Released |
static class |
TaskMonitor.Released$ |
static class |
TaskMonitor.Running$ |
static class |
TaskMonitor.Staging$ |
static class |
TaskMonitor.StateData
The task monitor state data.
|
static class |
TaskMonitor.StateData$ |
static class |
TaskMonitor.Suspended$ |
static interface |
TaskMonitor.TaskGoalState
Indicates the goal (intentional) state of a Mesos task; behavior varies accordingly.
|
static class |
TaskMonitor.TaskGoalStateUpdated
Conveys an update to the goal (intentional) state of a given task.
|
static class |
TaskMonitor.TaskGoalStateUpdated$ |
static interface |
TaskMonitor.TaskMonitorState
An FSM state of the task monitor, roughly corresponding to the task status.
|
static class |
TaskMonitor.TaskTerminated
Indicates that the Mesos task has terminated for whatever reason.
|
static class |
TaskMonitor.TaskTerminated$ |
akka.actor.FSM.$minus$greater$, akka.actor.FSM.CurrentState<S>, akka.actor.FSM.CurrentState$, akka.actor.FSM.Event<D>, akka.actor.FSM.Event$, akka.actor.FSM.Failure, akka.actor.FSM.Failure$, akka.actor.FSM.LogEntry<S,D>, akka.actor.FSM.LogEntry$, akka.actor.FSM.Normal$, akka.actor.FSM.NullFunction$, akka.actor.FSM.Reason, akka.actor.FSM.Shutdown$, akka.actor.FSM.State<S,D>, akka.actor.FSM.State$, akka.actor.FSM.StateTimeout$, akka.actor.FSM.StopEvent<S,D>, akka.actor.FSM.StopEvent$, akka.actor.FSM.SubscribeTransitionCallBack, akka.actor.FSM.SubscribeTransitionCallBack$, akka.actor.FSM.TimeoutMarker, akka.actor.FSM.TimeoutMarker$, akka.actor.FSM.Timer, akka.actor.FSM.Timer$, akka.actor.FSM.TransformHelper, akka.actor.FSM.Transition<S>, akka.actor.FSM.Transition$, akka.actor.FSM.UnsubscribeTransitionCallBack, akka.actor.FSM.UnsubscribeTransitionCallBack$
Constructor and Description |
---|
TaskMonitor(Configuration flinkConfig,
org.apache.mesos.SchedulerDriver schedulerDriver,
TaskMonitor.TaskGoalState goalState) |
Modifier and Type | Method and Description |
---|---|
static <T extends TaskMonitor> |
createActorProps(Class<T> actorClass,
Configuration flinkConfig,
org.apache.mesos.SchedulerDriver schedulerDriver,
TaskMonitor.TaskGoalState goalState)
Creates the properties for the TaskMonitor actor.
|
static scala.concurrent.duration.FiniteDuration |
LAUNCH_TIMEOUT() |
grizzled.slf4j.Logger |
LOG() |
static scala.concurrent.duration.FiniteDuration |
RETRY_INTERVAL() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
$minus$greater, akka$actor$FSM$_setter_$$minus$greater_$eq, akka$actor$FSM$_setter_$akka$actor$FSM$$handleEventDefault_$eq, akka$actor$FSM$_setter_$akka$actor$FSM$$stateFunctions_$eq, akka$actor$FSM$_setter_$akka$actor$FSM$$stateTimeouts_$eq, akka$actor$FSM$_setter_$akka$actor$FSM$$timerGen_$eq, akka$actor$FSM$_setter_$akka$actor$FSM$$timers_$eq, akka$actor$FSM$_setter_$Event_$eq, akka$actor$FSM$_setter_$StateTimeout_$eq, akka$actor$FSM$_setter_$StopEvent_$eq, akka$actor$FSM$$currentState_$eq, akka$actor$FSM$$currentState, akka$actor$FSM$$generation_$eq, akka$actor$FSM$$generation, akka$actor$FSM$$handleEvent_$eq, akka$actor$FSM$$handleEvent, akka$actor$FSM$$handleEventDefault, akka$actor$FSM$$nextState_$eq, akka$actor$FSM$$nextState, akka$actor$FSM$$stateFunctions, akka$actor$FSM$$stateTimeouts, akka$actor$FSM$$super$postStop, akka$actor$FSM$$terminateEvent_$eq, akka$actor$FSM$$terminateEvent, akka$actor$FSM$$timeoutFuture_$eq, akka$actor$FSM$$timeoutFuture, akka$actor$FSM$$timerGen, akka$actor$FSM$$timers, akka$actor$FSM$$transitionEvent_$eq, akka$actor$FSM$$transitionEvent, applyState, cancelTimer, debugEvent, Event, goto, initialize, isStateTimerActive, isTimerActive, logTermination, makeTransition, nextStateData, onTermination, onTransition, postStop, processEvent, receive, setStateTimeout, setTimer, setTimer$default$4, startWith, startWith$default$3, stateData, stateName, StateTimeout, stay, stop, stop, stop, StopEvent, total2pf, transform, when, when$default$2, whenUnhandled
akka$actor$Actor$_setter_$context_$eq, akka$actor$Actor$_setter_$self_$eq, aroundPostRestart, aroundPostStop, aroundPreRestart, aroundPreStart, aroundReceive, context, postRestart, preRestart, preStart, self, sender, supervisorStrategy, unhandled
public TaskMonitor(Configuration flinkConfig, org.apache.mesos.SchedulerDriver schedulerDriver, TaskMonitor.TaskGoalState goalState)
public static scala.concurrent.duration.FiniteDuration RETRY_INTERVAL()
public static scala.concurrent.duration.FiniteDuration LAUNCH_TIMEOUT()
public static <T extends TaskMonitor> akka.actor.Props createActorProps(Class<T> actorClass, Configuration flinkConfig, org.apache.mesos.SchedulerDriver schedulerDriver, TaskMonitor.TaskGoalState goalState)
actorClass
- the task monitor actor classflinkConfig
- the Flink configurationschedulerDriver
- the Mesos scheduler drivergoalState
- the task's goal statepublic grizzled.slf4j.Logger LOG()
Copyright © 2014–2017 The Apache Software Foundation. All rights reserved.