Examples of TaskConfig


Examples of org.apache.aurora.gen.TaskConfig

  private ScheduledTask makeTask(String role, String job, String taskId, int priority,
                                 String env, boolean production) {
    AssignedTask assignedTask = new AssignedTask()
        .setTaskId(taskId)
        .setTask(new TaskConfig()
            .setOwner(new Identity(role, role))
            .setPriority(priority)
            .setProduction(production)
            .setJobName(job)
            .setEnvironment(env)
View Full Code Here

Examples of org.apache.aurora.gen.TaskConfig

    return IScheduledTask.build(new ScheduledTask()
        .setStatus(ScheduleStatus.RUNNING)
        .setAssignedTask(
            new AssignedTask()
                .setTaskId(taskId)
                .setTask(new TaskConfig()
                    .setOwner(new Identity(ROLE, ROLE))
                    .setEnvironment(ENV)
                    .setJobName(jobName)
                    .setNumCpus(cpus)
                    .setRamMb(ramMb)
View Full Code Here

Examples of org.apache.aurora.gen.TaskConfig

        .setHostAttributes(ImmutableSet.of(new HostAttributes("host",
            ImmutableSet.of(new Attribute("hostname", ImmutableSet.of("abc"))))))
        .setTasks(ImmutableSet.of(
            new ScheduledTask().setStatus(ScheduleStatus.RUNNING)
                .setAssignedTask(new AssignedTask().setTaskId("task_id")
                    .setTask(new TaskConfig().setJobName("job_name")))));
  }
View Full Code Here

Examples of org.apache.aurora.gen.TaskConfig

  private static IScheduledTask task(String id, ScheduleStatus status) {
    return IScheduledTask.build(new ScheduledTask()
        .setStatus(status)
        .setAssignedTask(new AssignedTask()
            .setTaskId(id)
            .setTask(new TaskConfig())));
  }
View Full Code Here

Examples of org.apache.aurora.gen.TaskConfig

  private static ScheduledTask makeTask(String taskId) {
    return new ScheduledTask().setAssignedTask(
        new AssignedTask()
            .setTaskId(taskId)
            .setTask(new TaskConfig()
                .setJobName("job-" + taskId)
                .setEnvironment("test")
                .setOwner(new Identity().setRole("role-" + taskId).setUser("user-" + taskId))));
  }
View Full Code Here

Examples of org.apache.aurora.gen.TaskConfig

  private static IScheduledTask buildScheduledTask(String jobName, String taskId) {
    return IScheduledTask.build(new ScheduledTask()
        .setAssignedTask(new AssignedTask()
            .setTaskId(taskId)
            .setTask(new TaskConfig()
                .setOwner(ROLE_IDENTITY)
                .setEnvironment(DEFAULT_ENVIRONMENT)
                .setJobName(jobName))));
  }
View Full Code Here

Examples of org.apache.aurora.gen.TaskConfig

  public void testCreateJobNoResources() throws Exception {
    expectAuth(ROLE, true);

    control.replay();

    TaskConfig task = productionTask();
    task.unsetNumCpus();
    task.unsetRamMb();
    task.unsetDiskMb();
    assertResponse(INVALID_REQUEST, thrift.createJob(makeJob(task), DEFAULT_LOCK, SESSION));
  }
View Full Code Here

Examples of org.apache.aurora.gen.TaskConfig

  public void testCreateJobBadCpu() throws Exception {
    expectAuth(ROLE, true);

    control.replay();

    TaskConfig task = productionTask().setNumCpus(0.0);
    assertResponse(INVALID_REQUEST, thrift.createJob(makeJob(task), DEFAULT_LOCK, SESSION));
  }
View Full Code Here

Examples of org.apache.aurora.gen.TaskConfig

  public void testCreateJobBadRam() throws Exception {
    expectAuth(ROLE, true);

    control.replay();

    TaskConfig task = productionTask().setRamMb(-123);
    assertResponse(INVALID_REQUEST, thrift.createJob(makeJob(task), DEFAULT_LOCK, SESSION));
  }
View Full Code Here

Examples of org.apache.aurora.gen.TaskConfig

  public void testCreateJobBadDisk() throws Exception {
    expectAuth(ROLE, true);

    control.replay();

    TaskConfig task = productionTask().setDiskMb(0);
    assertResponse(INVALID_REQUEST, thrift.createJob(makeJob(task), DEFAULT_LOCK, SESSION));
  }
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.