Package org.apache.aurora.gen.storage

Examples of org.apache.aurora.gen.storage.Op


    createNoMessagesStreamManager().snapshot(snapshot);
  }

  @Test
  public void testTransactionOps() throws CodingException {
    Op saveFrameworkId = Op.saveFrameworkId(new SaveFrameworkId("jake"));
    Op deleteJob = Op.removeJob(new RemoveJob(JobKeys.from("role", "env", "name").newBuilder()));
    expectTransaction(position1, saveFrameworkId, deleteJob);

    control.replay();

    StreamTransaction transaction = createNoMessagesStreamManager().startTransaction();
View Full Code Here


    return new Message(chunkSize, header, chunks);
  }

  @Test
  public void testTransactionFrames() throws Exception {
    Op saveFrameworkId = Op.saveFrameworkId(new SaveFrameworkId("jake"));

    Message message = frame(createLogEntry(saveFrameworkId));
    expectFrames(position1, message);

    control.replay();
View Full Code Here

  @Test
  public void testConcurrentWrites() throws Exception {
    control.replay(); // No easymock expectations used here

    Op op1 = Op.removeJob(new RemoveJob(JobKeys.from("r1", "env", "name").newBuilder()));
    final Op op2 = Op.removeJob(new RemoveJob(JobKeys.from("r2", "env", "name").newBuilder()));

    LogEntry transaction1 = createLogEntry(op1);
    LogEntry transaction2 = createLogEntry(op2);

    final CountDownLatch message1Started = new CountDownLatch(1);
View Full Code Here

       * @param op The local storage op to add.
       */
      void add(Op op) {
        Preconditions.checkState(!committed.get());

        Op prior = transaction.isSetOps() ? Iterables.getLast(transaction.getOps(), null) : null;
        if (prior == null || !coalesce(prior, op)) {
          transaction.addToOps(op);
        }
      }
View Full Code Here

    @Override
    public void add(Op op) {
      Preconditions.checkState(!committed.get());

      Op prior = transaction.isSetOps() ? Iterables.getLast(transaction.getOps(), null) : null;
      if (prior == null || !coalesce(prior, op)) {
        transaction.addToOps(op);
      }
    }
View Full Code Here

    createNoMessagesStreamManager().snapshot(snapshot);
  }

  @Test
  public void testTransactionOps() throws CodingException {
    Op saveFrameworkId = Op.saveFrameworkId(new SaveFrameworkId("jake"));
    Op deleteJob = Op.removeJob(new RemoveJob(JobKeys.from("role", "env", "name").newBuilder()));
    expectTransaction(position1, saveFrameworkId, deleteJob);

    StreamManager streamManager = createNoMessagesStreamManager();
    control.replay();
View Full Code Here

    return new Message(chunkSize, header, chunks);
  }

  @Test
  public void testTransactionFrames() throws Exception {
    Op saveFrameworkId = Op.saveFrameworkId(new SaveFrameworkId("jake"));

    Message message = frame(createLogEntry(saveFrameworkId));
    expectFrames(position1, message);

    StreamManager streamManager = createStreamManager(message.chunkSize);
View Full Code Here

  @Test
  public void testConcurrentWrites() throws Exception {
    control.replay(); // No easymock expectations used here

    Op op1 = Op.removeJob(new RemoveJob(JobKeys.from("r1", "env", "name").newBuilder()));
    final Op op2 = Op.removeJob(new RemoveJob(JobKeys.from("r2", "env", "name").newBuilder()));

    LogEntry transaction1 = createLogEntry(op1);
    LogEntry transaction2 = createLogEntry(op2);

    final CountDownLatch message1Started = new CountDownLatch(1);
View Full Code Here

TOP

Related Classes of org.apache.aurora.gen.storage.Op

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.