Examples of newBuilder()


Examples of org.apache.aurora.scheduler.storage.entities.IScheduledTask.newBuilder()

    assertEquals(1, getValue(PENDING));
    changeState(IScheduledTask.build(taskA.newBuilder().setStatus(PENDING)), ASSIGNED);
    assertEquals(0, getValue(PENDING));
    assertEquals(1, getValue(ASSIGNED));
    taskA = makeTask(JOB_A, ASSIGNED, "hostA");
    changeState(IScheduledTask.build(taskA.newBuilder().setStatus(ASSIGNED)), RUNNING);
    assertEquals(0, getValue(ASSIGNED));
    assertEquals(1, getValue(RUNNING));
    changeState(IScheduledTask.build(taskA.newBuilder().setStatus(RUNNING)), FINISHED);
    assertEquals(0, getValue(RUNNING));
    assertEquals(1, getValue(FINISHED));
View Full Code Here

Examples of org.apache.aurora.scheduler.storage.entities.IScheduledTask.newBuilder()

    assertEquals(1, getValue(ASSIGNED));
    taskA = makeTask(JOB_A, ASSIGNED, "hostA");
    changeState(IScheduledTask.build(taskA.newBuilder().setStatus(ASSIGNED)), RUNNING);
    assertEquals(0, getValue(ASSIGNED));
    assertEquals(1, getValue(RUNNING));
    changeState(IScheduledTask.build(taskA.newBuilder().setStatus(RUNNING)), FINISHED);
    assertEquals(0, getValue(RUNNING));
    assertEquals(1, getValue(FINISHED));
    assertEquals(0, getValue(rackStatName("rackA")));
    vars.tasksDeleted(new TasksDeleted(ImmutableSet.of(
        IScheduledTask.build(taskA.newBuilder().setStatus(FINISHED)))));
View Full Code Here

Examples of org.apache.aurora.scheduler.storage.entities.IScheduledTask.newBuilder()

    changeState(IScheduledTask.build(taskA.newBuilder().setStatus(RUNNING)), FINISHED);
    assertEquals(0, getValue(RUNNING));
    assertEquals(1, getValue(FINISHED));
    assertEquals(0, getValue(rackStatName("rackA")));
    vars.tasksDeleted(new TasksDeleted(ImmutableSet.of(
        IScheduledTask.build(taskA.newBuilder().setStatus(FINISHED)))));
    assertAllZero();
  }

  @Test
  public void testLoadsFromStorage() {
View Full Code Here

Examples of org.apache.aurora.scheduler.storage.entities.IScheduledTask.newBuilder()

    expectAnyMaintenanceCalls();

    IScheduledTask jobA0 = makeTask("a0", PENDING);

    ScheduledTask jobA1Builder = jobA0.newBuilder();
    jobA1Builder.getAssignedTask().setTaskId("a1");
    jobA1Builder.getAssignedTask().setInstanceId(1);
    IScheduledTask jobA1 = IScheduledTask.build(jobA1Builder);

    ScheduledTask jobA2Builder = jobA0.newBuilder();
View Full Code Here

Examples of org.apache.aurora.scheduler.storage.entities.ITaskConfig.newBuilder()

            .setScheduler(StateManagerImpl.LOCAL_HOST_SUPPLIER.get())
            .setStatus(PENDING)))
        .setAssignedTask(new AssignedTask()
            .setInstanceId(3)
            .setTaskId(taskId)
            .setTask(task.newBuilder()));
    assertEquals(ImmutableSet.of(IScheduledTask.build(expected)),
        Storage.Util.consistentFetchTasks(storage, Query.taskScoped(taskId)));
  }

  @Test
View Full Code Here

Examples of org.apache.aurora.scheduler.storage.entities.ITaskConfig.newBuilder()

      protected void setupExpectations() throws Exception {
        storageUtil.expectWriteOperation();
        expect(storageUtil.taskStore.unsafeModifyInPlace(taskId2, updatedConfig)).andReturn(false);
        expect(storageUtil.taskStore.unsafeModifyInPlace(taskId, updatedConfig)).andReturn(true);
        streamMatcher.expectTransaction(
            Op.rewriteTask(new RewriteTask(taskId, updatedConfig.newBuilder())))
            .andReturn(position);
      }

      @Override
      protected void performMutations(MutableStoreProvider storeProvider) {
View Full Code Here

Examples of org.apache.aurora.scheduler.storage.entities.ITaskConfig.newBuilder()

    expectAuth(ROOT, true);
    storageUtil.expectTaskFetch(Query.instanceScoped(instanceKey).active(), storedTask);
    expect(storageUtil.taskStore.unsafeModifyInPlace(
        taskId,
        ITaskConfig.build(ConfigurationManager.applyDefaultsIfUnset(modifiedConfig.newBuilder()))))
        .andReturn(true);

    control.replay();

    RewriteConfigsRequest request = new RewriteConfigsRequest(
View Full Code Here

Examples of org.apache.aurora.scheduler.storage.entities.ITaskConfig.newBuilder()

    control.replay();

    RewriteConfigsRequest request = new RewriteConfigsRequest(
        ImmutableList.of(ConfigRewrite.instanceRewrite(
            new InstanceConfigRewrite(instanceKey, storedConfig, modifiedConfig.newBuilder()))));
    assertOkResponse(thrift.rewriteConfigs(request, SESSION));
  }

  @Test
  public void testRewriteJobCasMismatch() throws Exception {
View Full Code Here

Examples of org.apache.cxf.tools.java2wsdl.processor.internal.ServiceBuilderFactory.newBuilder()

        }
        builderFactory.setServiceClass(clz);
        builderFactory.setDatabindingName(getDataBindingName());
        // The service class determines the frontend, so no need to pass it in
        // twice.
        ServiceBuilder builder = builderFactory.newBuilder();

        builder.validate();

        builder.setTransportId(getTransportId());
        builder.setBus(getBus());
View Full Code Here

Examples of org.apache.cxf.tools.java2wsdl.processor.internal.ServiceBuilderFactory.newBuilder()

            context.put(ToolConstants.GEN_FROM_SEI, Boolean.FALSE);
        }
        builderFactory.setServiceClass(clz);
        // TODO check if user specify the style from cli arguments
        //      builderFactory.setStyle(style/from/command/line);
        ServiceBuilder builder = builderFactory.newBuilder();

        builder.validate();

        if (context.get(ToolConstants.CFG_ADDRESS) != null) {
            String address = (String)context.get(ToolConstants.CFG_ADDRESS);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.