Search in sources :

Example 1 with Type

use of org.apache.mesos.v1.scheduler.Protos.Call.Type 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);
}
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 Type

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

the class SingularityMesosSchedulerClient method sendCall.

private void sendCall(Call.Builder b, Type t) {
    Call call = b.setType(t).setFrameworkId(frameworkId).build();
    sendCall(call);
}
Also used : Call(org.apache.mesos.v1.scheduler.Protos.Call)

Aggregations

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