Package org.apache.aurora.scheduler.updater.JobUpdateStateMachine

Examples of org.apache.aurora.scheduler.updater.JobUpdateStateMachine.MonitorAction


      lockManager.releaseLock(ILock.build(new Lock()
          .setKey(LockKey.job(job.newBuilder()))
          .setToken(updateLock.get())));
    }

    MonitorAction action = JobUpdateStateMachine.getActionForStatus(status);
    if (action == STOP_WATCHING) {
      updates.remove(job);
    } else if (action == ROLL_FORWARD || action == ROLL_BACK) {
      if (action == ROLL_BACK) {
        updates.remove(job);
View Full Code Here


  @Test
  public void testTransition() {
    for (JobUpdateStatus from : JobUpdateStatus.values()) {
      for (JobUpdateStatus to : JobUpdateStatus.values()) {
        Pair<JobUpdateStatus, JobUpdateStatus> key = Pair.of(from, to);
        MonitorAction expected = EXPECTED.get(key);
        try {
          JobUpdateStateMachine.assertTransitionAllowed(from, to);
          MonitorAction actual = JobUpdateStateMachine.getActionForStatus(to);
          if (expected == null) {
            fail("Transition " + key + " should have been disallowed, but got result " + actual);
          }
          assertEquals("Failed transition " + key, expected, actual);
        } catch (IllegalStateException e) {
View Full Code Here

TOP

Related Classes of org.apache.aurora.scheduler.updater.JobUpdateStateMachine.MonitorAction

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.