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));
}
Aggregations