Search in sources :

Example 1 with DeactivateFrameworkMessage

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

the class InternalSchedulerDriver method abort.

@Override
public Status abort() {
    if (!context.isStateMachine(DRIVER_RUNNING)) {
        return context.getStateMachine();
    }
    if (context.isConnected()) {
        final DeactivateFrameworkMessage message = DeactivateFrameworkMessage.newBuilder().setFrameworkId(context.getFrameworkId()).build();
        eventBus.post(new RemoteMessageEnvelope(context.getDriverUPID(), context.getMasterUPID(), message));
    }
    context.setStateMachine(DRIVER_ABORTED);
    return context.getStateMachine();
}
Also used : DeactivateFrameworkMessage(mesos.internal.Messages.DeactivateFrameworkMessage) RemoteMessageEnvelope(com.groupon.mesos.scheduler.SchedulerMessageEnvelope.RemoteMessageEnvelope)

Aggregations

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