Package org.apache.aurora.gen

Examples of org.apache.aurora.gen.TaskEvent


    }
    return taskEvents.build();
  }

  private static TaskEvent makeTaskEvent(long ts, ScheduleStatus status) {
    return new TaskEvent().setTimestamp(ts).setStatus(status);
  }
View Full Code Here


      String taskId,
      ScheduleStatus status) {

    return IScheduledTask.build(new ScheduledTask()
        .setStatus(status)
        .setTaskEvents(ImmutableList.of(new TaskEvent(clock.nowMillis(), status)))
        .setAssignedTask(makeAssignedTask(job, taskId)));
  }
View Full Code Here

      ScheduleStatus status,
      long stateEnteredMs) {

    return IScheduledTask.build(new ScheduledTask()
        .setStatus(status)
        .setTaskEvents(ImmutableList.of(new TaskEvent(stateEnteredMs, status)))
        .setAssignedTask(new AssignedTask()
            .setTaskId(taskId)
            .setTask(new TaskConfig())));
  }
View Full Code Here

  }

  private IScheduledTask makeTask(String id, ScheduleStatus status) {
    return IScheduledTask.build(new ScheduledTask()
        .setTaskEvents(ImmutableList.of(
            new TaskEvent()
                .setStatus(status)
                .setTimestamp(clock.nowMillis())))
        .setStatus(status)
        .setAssignedTask(new AssignedTask().setTaskId(id)));
  }
View Full Code Here

    control.replay();

    insertTask(task, 3);
    ScheduledTask expected = new ScheduledTask()
        .setStatus(PENDING)
        .setTaskEvents(ImmutableList.of(new TaskEvent()
            .setTimestamp(clock.nowMillis())
            .setScheduler(StateManagerImpl.LOCAL_HOST_SUPPLIER.get())
            .setStatus(PENDING)))
        .setAssignedTask(new AssignedTask()
            .setInstanceId(3)
View Full Code Here

  }

  public static List<ITaskEvent> makeEvents(Map<Long, ScheduleStatus> events) {
    ImmutableList.Builder<ITaskEvent> taskEvents = ImmutableList.builder();
    for (Map.Entry<Long, ScheduleStatus> entry : events.entrySet()) {
      taskEvents.add(ITaskEvent.build(new TaskEvent(entry.getKey(), entry.getValue())));
    }

    return taskEvents.build();
  }
View Full Code Here

  }

  private static ScheduledTask makeTask(String id, ScheduleStatus status) {
    ScheduledTask scheduledTask = new ScheduledTask()
        .setStatus(status)
        .setTaskEvents(ImmutableList.of(new TaskEvent(100, status)))
        .setAssignedTask(new AssignedTask()
            .setTaskId(id)
            .setTask(new TaskConfig()
                .setJobName("job-" + id)
                .setEnvironment("test")
View Full Code Here

  private ScheduledTask makeTask(String role, String job, String taskId, int priority) {
    return makeTask(role, job, taskId, priority, "dev", false);
  }

  private void addEvent(ScheduledTask task, ScheduleStatus status) {
    task.addToTaskEvents(new TaskEvent(clock.nowMillis(), status));
  }
View Full Code Here

      @Override
      protected void execute(Storage.MutableStoreProvider storeProvider) {
        storeProvider.getUnsafeTaskStore().saveTasks(ImmutableSet.of(
            IScheduledTask.build(new ScheduledTask()
                .setStatus(PENDING)
                .setTaskEvents(ImmutableList.of(new TaskEvent(100, PENDING)))
                .setAssignedTask(new AssignedTask()
                    .setTaskId(TASK_ID)
                    .setInstanceId(0)
                    .setTask(storedTask)))));
      }
View Full Code Here

        String newestTask = Iterables.getLast(Sets.newTreeSet(activeTasksInShard));
        if (Tasks.id(task).equals(newestTask)) {
          LOG.info("Retaining task " + Tasks.id(task));
        } else {
          task.setStatus(ScheduleStatus.KILLED);
          task.addToTaskEvents(new TaskEvent(clock.nowMillis(), ScheduleStatus.KILLED)
              .setMessage("Killed duplicate shard."));
          // TODO(wfarner); Circle back if this is necessary.  Currently there's a race
          // condition between the time the scheduler is actually available without hitting
          // IllegalStateException (see DriverImpl).
          // driver.killTask(Tasks.id(task));
View Full Code Here

TOP

Related Classes of org.apache.aurora.gen.TaskEvent

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.