Package org.apache.aurora.gen

Examples of org.apache.aurora.gen.ScheduleStatus


  private StateEvaluator.Result handleActualAndDesiredPresent(IScheduledTask actualState) {
    Preconditions.checkState(desiredState.isPresent());
    Preconditions.checkArgument(!actualState.getTaskEvents().isEmpty());

    ScheduleStatus status = actualState.getStatus();
    if (desiredState.get().equals(actualState.getAssignedTask().getTask())) {
      // The desired task is in the system.
      if (status == RUNNING) {
        // The desired task is running.
        if (appearsStable(actualState)) {
View Full Code Here


    if (status.hasMessage()) {
      message = status.getMessage();
    }

    try {
      final ScheduleStatus translatedState = Conversions.convertProtoState(status.getState());
      // TODO(William Farner): Remove this hack once Mesos API change is done.
      //                       Tracked by: https://issues.apache.org/jira/browse/MESOS-343
      if (translatedState == ScheduleStatus.FAILED
          && message != null
          && message.contains(MEMORY_LIMIT_EXCEEDED)) {
View Full Code Here

    assertResponse(AUTH_FAILED, thrift.setQuota(ROLE, resourceAggregate, SESSION));
  }

  @Test
  public void testForceTaskState() throws Exception {
    ScheduleStatus status = ScheduleStatus.FAILED;

    expect(stateManager.changeState(
        storageUtil.mutableStoreProvider,
        TASK_ID,
        Optional.<ScheduleStatus>absent(),
View Full Code Here

  private void legalTransition(TaskState state, SideEffect.Action... expectedActions) {
    legalTransition(state, ImmutableSet.copyOf(expectedActions));
  }

  private void legalTransition(TaskState state, Set<SideEffect.Action> expectedActions) {
    ScheduleStatus previousState = stateMachine.getPreviousState();
    TransitionResult result = stateMachine.updateState(state.getStatus());
    assertTrue("Transition to " + state + " was not successful", result.isSuccess());
    assertNotEquals(previousState, stateMachine.getPreviousState());
    assertEquals(
        FluentIterable.from(expectedActions).transform(TO_SIDE_EFFECT).toSet(),
View Full Code Here

        .add(next)
        .add(others)
        .build();
    PeekingIterator<ScheduleStatus> it = Iterators.peekingIterator(statuses.iterator());
    while (it.hasNext()) {
      ScheduleStatus cur = it.next();
      try {
        eventSink.post(matchStateChange(taskId, cur, it.peek()));
      } catch (NoSuchElementException e) {
        // Expected.
      }
View Full Code Here

TOP

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

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.