Search in sources :

Example 1 with Shutdown

use of org.apache.mesos.v1.scheduler.Protos.Call.Shutdown 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);
}
Also used : MesosClientBuilder(com.mesosphere.mesos.rx.java.MesosClientBuilder) ProtobufMesosClientBuilder(com.mesosphere.mesos.rx.java.protobuf.ProtobufMesosClientBuilder) Builder(org.apache.mesos.v1.scheduler.Protos.Call.Builder)

Example 2 with Shutdown

use of org.apache.mesos.v1.scheduler.Protos.Call.Shutdown in project Singularity by HubSpot.

the class SingularityMesosSchedulerClient method shutdown.

public void shutdown(ExecutorID executorId, AgentID agentId) {
    Builder shutdown = build().setShutdown(Shutdown.newBuilder().setExecutorId(executorId).setAgentId(agentId));
    sendCall(shutdown, Type.SHUTDOWN);
}
Also used : MesosClientBuilder(com.mesosphere.mesos.rx.java.MesosClientBuilder) ProtobufMesosClientBuilder(com.mesosphere.mesos.rx.java.protobuf.ProtobufMesosClientBuilder) Builder(org.apache.mesos.v1.scheduler.Protos.Call.Builder)

Aggregations

MesosClientBuilder (com.mesosphere.mesos.rx.java.MesosClientBuilder)2 ProtobufMesosClientBuilder (com.mesosphere.mesos.rx.java.protobuf.ProtobufMesosClientBuilder)2 Builder (org.apache.mesos.v1.scheduler.Protos.Call.Builder)2