Search in sources :

Example 1 with StatusUpdateMessageEnvelope

use of com.groupon.mesos.scheduler.SchedulerMessageEnvelope.StatusUpdateMessageEnvelope in project jesos by groupon.

the class InternalSchedulerDriver method loseTask.

private void loseTask(final TaskInfo taskInfo, final String reason) {
    final StatusUpdateMessage statusUpdate = StatusUpdateMessage.newBuilder().setUpdate(StatusUpdate.newBuilder().setFrameworkId(context.getFrameworkId()).setSlaveId(taskInfo.getSlaveId()).setExecutorId(taskInfo.getExecutor().getExecutorId()).setStatus(TaskStatus.newBuilder().setTaskId(taskInfo.getTaskId()).setState(TaskState.TASK_LOST).setMessage(reason)).setTimestamp(TimeUtil.currentTime()).setUuid(UUIDUtil.uuidBytes(UUID.randomUUID()))).build();
    eventBus.post(new StatusUpdateMessageEnvelope(context.getDriverUPID(), context.getDriverUPID(), statusUpdate));
}
Also used : StatusUpdateMessageEnvelope(com.groupon.mesos.scheduler.SchedulerMessageEnvelope.StatusUpdateMessageEnvelope) StatusUpdateMessage(mesos.internal.Messages.StatusUpdateMessage)

Aggregations

StatusUpdateMessageEnvelope (com.groupon.mesos.scheduler.SchedulerMessageEnvelope.StatusUpdateMessageEnvelope)1 StatusUpdateMessage (mesos.internal.Messages.StatusUpdateMessage)1