Package org.apache.aurora.gen

Examples of org.apache.aurora.gen.Identity


  private IScheduledTask makeTask(String taskId) {
    return IScheduledTask.build(new ScheduledTask().setAssignedTask(
        new AssignedTask()
            .setTaskId(taskId)
            .setTask(new TaskConfig()
                .setOwner(new Identity().setRole("owner-" + taskId))
                .setJobName("job-" + taskId)
                .setEnvironment("env-" + taskId))));
  }
View Full Code Here


                .setSlaveHost(host)
                .setTaskId(taskId)
                .setTask(
                    new TaskConfig()
                        .setJobName("jobName")
                        .setOwner(new Identity().setRole("role").setUser("role"))));
  }
View Full Code Here

        new AssignedTask().setTask(config.newBuilder()).setInstanceId(instance));
  }

  private static ITaskConfig makeTask(String job, String config) {
    return ITaskConfig.build(new TaskConfig()
        .setOwner(new Identity("owner", "owner"))
        .setEnvironment("test")
        .setJobName(job)
        .setExecutorConfig(new ExecutorConfig().setData(config)));
  }
View Full Code Here

        .setAssignedTask(
            new AssignedTask()
                .setTaskId("test")
                .setTask(
                    new TaskConfig()
                        .setOwner(new Identity().setRole("roleA"))
                        .setJobName("jobA")
                        .setIsService(service)));
  }
View Full Code Here

  private TaskConfig makeTaskConfig() {
    return new TaskConfig()
        .setJobName(JOB.getName())
        .setEnvironment(JOB.getEnvironment())
        .setOwner(new Identity(JOB.getRole(), "user"))
        .setIsService(true);
  }
View Full Code Here

  private static TaskConfig makeTaskConfig() {
    return new TaskConfig()
        .setJob(new JobKey(JOB.newBuilder()))
        .setJobName(JOB.getName())
        .setEnvironment(JOB.getEnvironment())
        .setOwner(new Identity(JOB.getRole(), "user"))
        .setIsService(true)
        .setExecutorConfig(new ExecutorConfig().setName("old"))
        .setNumCpus(1);
  }
View Full Code Here

    String dedicated1 = "userA/jobA";
    String dedicated2 = "kestrel/kestrel";
    IHostAttributes hostA = hostAttributes(HOST_A, dedicated(dedicated1, dedicated2));
    assertNoVetoes(
        checkConstraint(
            new Identity().setRole("userA"),
            "jobA",
            hostA,
            DEDICATED_ATTRIBUTE,
            true,
            dedicated1),
        hostA);
    assertNoVetoes(
        checkConstraint(
            new Identity().setRole("kestrel"),
            "kestrel",
            hostA,
            DEDICATED_ATTRIBUTE,
            true,
            dedicated2),
View Full Code Here

    expectJobUpdates(taskConfig(1, 1, 1, true), taskConfig(1, 1, 1, true));

    final String pcRole = "pc-role";
    ScheduledTask ignoredProdTask = createProdTask(pcRole, 20, 20, 20).newBuilder();
    ignoredProdTask.getAssignedTask().getTask()
        .setOwner(new Identity(pcRole, "ignored"))
        .setJob(new JobKey(pcRole, ENV, pcRole));

    final String npcRole = "npc-role";
    ScheduledTask ignoredNonProdTask = createNonProdTask(npcRole, 20, 20, 20).newBuilder();
    ignoredNonProdTask.getAssignedTask().getTask()
        .setOwner(new Identity(npcRole, "ignored"))
        .setJob(new JobKey(npcRole, ENV, npcRole));

    expectCronJobs(
        createJob(createProdTask("pc", 3, 3, 3), 1),
        createJob(createNonProdTask("npc", 5, 5, 5), 2),
View Full Code Here

            new AssignedTask()
                .setTaskId(taskId)
                .setInstanceId(instanceId)
                .setTask(new TaskConfig()
                    .setJob(new JobKey(ROLE, ENV, jobName))
                    .setOwner(new Identity(ROLE, ROLE))
                    .setEnvironment(ENV)
                    .setJobName(jobName)
                    .setNumCpus(cpus)
                    .setRamMb(ramMb)
                    .setDiskMb(diskMb)
View Full Code Here

      ScheduleStatus status,
      Optional<String> dedicated) {

    TaskConfig task = new TaskConfig()
        .setJob(new JobKey(role, "test", job))
        .setOwner(new Identity().setRole(role))
        .setEnvironment("test")
        .setJobName(job)
        .setNumCpus(numCpus)
        .setRamMb(ramMb)
        .setDiskMb(diskMb)
View Full Code Here

TOP

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

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.