use of org.apache.mesos.v1.Protos.Labels.Builder in project Singularity by HubSpot.
the class SingularityMesosSchedulerClient method accept.
/**
* Sent by the scheduler when it accepts offer(s) sent by the master. The ACCEPT request includes the type of
* operations (e.g., launch task, launch task group, reserve resources, create volumes) that the scheduler wants to
* perform on the offers. Note that until the scheduler replies (accepts or declines) to an offer, the offer’s
* resources are considered allocated to the offer’s role and to the framework.
*
* @param offerIds
* @param offerOperations
*/
public void accept(List<OfferID> offerIds, List<Offer.Operation> offerOperations) {
Builder accept = build().setAccept(Accept.newBuilder().addAllOfferIds(offerIds).addAllOperations(offerOperations));
sendCall(accept, Type.ACCEPT);
}
use of org.apache.mesos.v1.Protos.Labels.Builder 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.Protos.Labels.Builder 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.Protos.Labels.Builder in project Singularity by HubSpot.
the class SingularityMesosSchedulerClient method frameworkMessage.
/**
* Sent by the scheduler to send arbitrary binary data to the executor. Mesos neither interprets this data nor
* makes any guarantees about the delivery of this message to the executor. data is raw bytes encoded in Base64.
*
* @param executorId
* @param agentId
* @param data
*/
public void frameworkMessage(ExecutorID executorId, AgentID agentId, byte[] data) {
Builder message = build().setMessage(Message.newBuilder().setAgentId(agentId).setExecutorId(executorId).setData(ByteString.copyFrom(data)));
sendCall(message, Type.MESSAGE);
}
use of org.apache.mesos.v1.Protos.Labels.Builder in project Singularity by HubSpot.
the class SingularityMesosSchedulerClient method accept.
public void accept(List<OfferID> offerIds, List<Offer.Operation> offerOperations, Filters filters) {
Builder accept = build().setAccept(Accept.newBuilder().addAllOfferIds(offerIds).addAllOperations(offerOperations).setFilters(filters));
sendCall(accept, Type.ACCEPT);
}
Aggregations