use of org.apache.mesos.v1.scheduler.Protos.Call.Kill in project Singularity by HubSpot.
the class SingularityMesosSchedulerClient method kill.
/**
* Sent by the scheduler to kill a specific task. If the scheduler has a custom executor, the kill is
* forwarded to the executor; it is up to the executor to kill the task and send a TASK_KILLED
* (or TASK_FAILED) update. If the task hasn’t yet been delivered to the executor when Mesos master or
* agent receives the kill request, a TASK_KILLED is generated and the task launch is not forwarded to
* the executor. Note that if the task belongs to a task group, killing of one task results in all tasks
* in the task group being killed. Mesos releases the resources for a task once it receives a terminal
* update for the task. If the task is unknown to the master, a TASK_LOST will be generated.
*
* @param taskId
*/
public void kill(TaskID taskId) {
Builder kill = build().setKill(Kill.newBuilder().setTaskId(taskId));
sendCall(kill, Type.KILL);
}
use of org.apache.mesos.v1.scheduler.Protos.Call.Kill in project Singularity by HubSpot.
the class SingularityMesosSchedulerClient method shutdown.
/**
* Sent by the scheduler to shutdown a specific custom executor. When an executor gets a shutdown event,
* it is expected to kill all its tasks (and send TASK_KILLED updates) and terminate. If an executor
* doesn’t terminate within a certain timeout, the agent will forcefully destroy the container
* (executor and its tasks) and transition its active tasks to TASK_LOST.
*
* @param executorId
*/
public void shutdown(ExecutorID executorId) {
Builder shutdown = build().setShutdown(Shutdown.newBuilder().setExecutorId(executorId));
sendCall(shutdown, Type.SHUTDOWN);
}
use of org.apache.mesos.v1.scheduler.Protos.Call.Kill in project Singularity by HubSpot.
the class SingularityMesosSchedulerClient method kill.
public void kill(TaskID taskId, AgentID agentId, KillPolicy killPolicy) {
Builder kill = build().setKill(Kill.newBuilder().setTaskId(taskId).setAgentId(agentId).setKillPolicy(killPolicy));
sendCall(kill, Type.KILL);
}
use of org.apache.mesos.v1.scheduler.Protos.Call.Kill in project Singularity by HubSpot.
the class SingularityMesosSchedulerClient method kill.
public void kill(TaskID taskId, KillPolicy killPolicy) {
Builder kill = build().setKill(Kill.newBuilder().setTaskId(taskId).setKillPolicy(killPolicy));
sendCall(kill, Type.KILL);
}
use of org.apache.mesos.v1.scheduler.Protos.Call.Kill in project Singularity by HubSpot.
the class SingularityMesosSchedulerClient method kill.
public void kill(TaskID taskId, AgentID agentId) {
Builder kill = build().setKill(Kill.newBuilder().setTaskId(taskId).setAgentId(agentId));
sendCall(kill, Type.KILL);
}
Aggregations