Package org.apache.aurora.gen

Examples of org.apache.aurora.gen.JobUpdateEvent


    LOG.info(String.format(
        "Update %s %s is now in state %s", JobKeys.canonicalString(job), updateId, status));
    if (record) {
      updateStore.saveJobUpdateEvent(
          IJobUpdateEvent.build(new JobUpdateEvent()
              .setStatus(status)
              .setUser(user.orNull())
              .setTimestampMs(clock.nowMillis())),
          updateId);
    }
View Full Code Here


        .setVersion(CURRENT_API_VERSION);
    final String updateId1 = "updateId1";
    final String updateId2 = "updateId2";
    IJobUpdateDetails updateDetails1 = IJobUpdateDetails.build(new JobUpdateDetails()
        .setUpdate(new JobUpdate().setSummary(new JobUpdateSummary().setUpdateId(updateId1)))
        .setUpdateEvents(ImmutableList.of(new JobUpdateEvent().setStatus(JobUpdateStatus.ERROR)))
        .setInstanceEvents(ImmutableList.of(new JobInstanceUpdateEvent().setTimestampMs(123L))));

    IJobUpdateDetails updateDetails2 = IJobUpdateDetails.build(new JobUpdateDetails()
        .setUpdate(new JobUpdate().setSummary(new JobUpdateSummary().setUpdateId(updateId2))));
View Full Code Here

    builder.add(createTransaction(Op.saveJobUpdate(saveUpdate)));
    storageUtil.jobUpdateStore.saveJobUpdate(
        IJobUpdate.build(saveUpdate.getJobUpdate()),
        Optional.of(saveUpdate.getLockToken()));

    SaveJobUpdateEvent saveUpdateEvent = new SaveJobUpdateEvent(new JobUpdateEvent(), "update");
    builder.add(createTransaction(Op.saveJobUpdateEvent(saveUpdateEvent)));
    storageUtil.jobUpdateStore.saveJobUpdateEvent(
        IJobUpdateEvent.build(saveUpdateEvent.getEvent()),
        saveUpdateEvent.getUpdateId());
View Full Code Here

    }.run();
  }

  @Test
  public void testSaveJobUpdateEvent() throws Exception {
    final IJobUpdateEvent event = IJobUpdateEvent.build(new JobUpdateEvent()
        .setStatus(JobUpdateStatus.ROLLING_BACK)
        .setTimestampMs(12345L));

    new MutationFixture() {
      @Override
View Full Code Here

    }

    store.saveJobUpdate(update, Optional.of(lock.getToken()));
    store.saveJobUpdateEvent(
        IJobUpdateEvent.build(
            new JobUpdateEvent()
                .setStatus(status)
                .setTimestampMs(clock.nowMillis())),
        update.getSummary().getUpdateId());
    return lock;
  }
View Full Code Here

  @Test
  public void testTruncateJobUpdates() {
    String updateId = "u5";
    IJobUpdate update = makeJobUpdate(JOB, updateId);
    IJobUpdateEvent updateEvent = IJobUpdateEvent.build(new JobUpdateEvent(ROLLING_FORWARD, 123L));
    IJobInstanceUpdateEvent instanceEvent = IJobInstanceUpdateEvent.build(
        new JobInstanceUpdateEvent(0, 125L, INSTANCE_ROLLBACK_FAILED));

    saveUpdate(update, Optional.of("lock"));
    saveJobEvent(updateEvent, updateId);
View Full Code Here

    IJobUpdate update4 = makeJobUpdate(JOB, updateId4);
    IJobUpdate update5 = makeJobUpdate(job2, updateId5);
    IJobUpdate update6 = makeJobUpdate(job2, updateId6);
    IJobUpdate update7 = makeJobUpdate(job2, updateId7);

    IJobUpdateEvent updateEvent1 = IJobUpdateEvent.build(new JobUpdateEvent(ROLLING_BACK, 123L));
    IJobUpdateEvent updateEvent2 = IJobUpdateEvent.build(new JobUpdateEvent(ABORTED, 124L));
    IJobUpdateEvent updateEvent3 = IJobUpdateEvent.build(new JobUpdateEvent(ROLLED_BACK, 125L));
    IJobUpdateEvent updateEvent4 = IJobUpdateEvent.build(new JobUpdateEvent(FAILED, 126L));
    IJobUpdateEvent updateEvent5 = IJobUpdateEvent.build(new JobUpdateEvent(ERROR, 123L));
    IJobUpdateEvent updateEvent6 = IJobUpdateEvent.build(new JobUpdateEvent(FAILED, 125L));
    IJobUpdateEvent updateEvent7 = IJobUpdateEvent.build(new JobUpdateEvent(ROLLING_FORWARD, 126L));

    update1 = populateExpected(
        saveUpdateNoEvent(update1, Optional.of("lock1")), ROLLING_BACK, 123L, 123L);
    update2 = populateExpected(
        saveUpdateNoEvent(update2, Optional.<String>absent()), ABORTED, 124L, 124L);
View Full Code Here

    return IJobUpdate.build(builder);
  }

  private static IJobUpdateEvent makeJobUpdateEvent(JobUpdateStatus status, long timestampMs) {
    return IJobUpdateEvent.build(
        new JobUpdateEvent(status, timestampMs));
  }
View Full Code Here

      JobUpdateStatus status,
      long timestampMs,
      String user) {

    return IJobUpdateEvent.build(
        new JobUpdateEvent(status, timestampMs).setUser(user));
  }
View Full Code Here

TOP

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

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.