Search in sources :

Example 1 with ResourceRequestMessage

use of mesos.internal.Messages.ResourceRequestMessage in project jesos by groupon.

the class InternalSchedulerDriver method requestResources.

@Override
public Status requestResources(final Collection<Protos.Request> requests) {
    checkNotNull(requests, "requests is null");
    if (!context.isStateMachine(DRIVER_RUNNING)) {
        return context.getStateMachine();
    }
    final ResourceRequestMessage message = ResourceRequestMessage.newBuilder().setFrameworkId(context.getFrameworkId()).addAllRequests(requests).build();
    eventBus.post(new RemoteMessageEnvelope(context.getDriverUPID(), context.getMasterUPID(), message));
    return context.getStateMachine();
}
Also used : RemoteMessageEnvelope(com.groupon.mesos.scheduler.SchedulerMessageEnvelope.RemoteMessageEnvelope) ResourceRequestMessage(mesos.internal.Messages.ResourceRequestMessage)

Aggregations

RemoteMessageEnvelope (com.groupon.mesos.scheduler.SchedulerMessageEnvelope.RemoteMessageEnvelope)1 ResourceRequestMessage (mesos.internal.Messages.ResourceRequestMessage)1