use of mesos.internal.Messages.LaunchTasksMessage in project jesos by groupon.
the class InternalSchedulerDriver method launchTasks.
@Override
public Status launchTasks(final Collection<OfferID> offerIds, final Collection<TaskInfo> tasks, final Filters filters) {
checkNotNull(offerIds, "offerIds is null");
checkNotNull(tasks, "tasks is null");
checkNotNull(filters, "filters is null");
if (!context.isStateMachine(DRIVER_RUNNING)) {
return context.getStateMachine();
}
final LaunchTasksMessage message = LaunchTasksMessage.newBuilder().setFrameworkId(context.getFrameworkId()).addAllOfferIds(offerIds).addAllTasks(tasks).setFilters(filters).build();
doLaunchTasks(message);
return context.getStateMachine();
}
use of mesos.internal.Messages.LaunchTasksMessage in project jesos by groupon.
the class InternalSchedulerDriver method declineOffer.
@Override
public Status declineOffer(final OfferID offerId) {
checkNotNull(offerId, "offerId is null");
if (!context.isStateMachine(DRIVER_RUNNING)) {
return context.getStateMachine();
}
final LaunchTasksMessage message = LaunchTasksMessage.newBuilder().setFrameworkId(context.getFrameworkId()).addOfferIds(offerId).setFilters(Filters.newBuilder().build()).build();
doLaunchTasks(message);
return context.getStateMachine();
}
Aggregations