Examples of TaskConfig


Examples of eu.stratosphere.pact.runtime.task.util.TaskConfig

    this.sorters = new ArrayList<UnilateralSortMerger<Record>>();
   
    this.owner = new DummyInvokable();
   
    this.config = new Configuration();
    this.taskConfig = new TaskConfig(this.config);
  }
View Full Code Here

Examples of io.druid.indexing.common.config.TaskConfig

    tsqa = new TaskStorageQueryAdapter(ts);
    tl = new TaskLockbox(ts);
    mdc = newMockMDC();
    tac = new LocalTaskActionClientFactory(ts, new TaskActionToolbox(tl, mdc, newMockEmitter()));
    tb = new TaskToolboxFactory(
        new TaskConfig(tmp.toString(), null, null, 50000, null),
        tac,
        newMockEmitter(),
        new DataSegmentPusher()
        {
          @Override
View Full Code Here

Examples of org.apache.aurora.gen.TaskConfig

   * @throws TaskDescriptionException If the task is invalid.
   */
  public static ITaskConfig validateAndPopulate(ITaskConfig config)
      throws TaskDescriptionException {

    TaskConfig builder = config.newBuilder();

    if (!builder.isSetRequestedPorts()) {
      builder.setRequestedPorts(ImmutableSet.<String>of());
    }

    maybeFillLinks(builder);

    assertOwnerValidity(config.getOwner());

    if (!isGoodIdentifier(config.getJobName())) {
      throw new TaskDescriptionException(
          "Job name contains illegal characters: " + config.getJobName());
    }

    if (!isGoodIdentifier(config.getEnvironment())) {
      throw new TaskDescriptionException(
          "Environment contains illegal characters: " + config.getEnvironment());
    }

    if (!builder.isSetExecutorConfig()) {
      throw new TaskDescriptionException("Configuration may not be null");
    }

    // Maximize the usefulness of any thrown error message by checking required fields first.
    for (RequiredFieldValidator<?> validator : REQUIRED_FIELDS_VALIDATORS) {
View Full Code Here

Examples of org.apache.aurora.gen.TaskConfig

    return IScheduledTask.build(new ScheduledTask()
        .setStatus(status)
        .setAssignedTask(new AssignedTask()
            .setTaskId("task_id")
            .setSlaveHost("host1")
            .setTask(new TaskConfig()
                .setJobName("job_a")
                .setOwner(new Identity("role_a", "role_a" + "-user"))))
        .setTaskEvents(taskEvents));
  }
View Full Code Here

Examples of org.apache.aurora.gen.TaskConfig

  private AssignedTask makeAssignedTask(String job, String taskId) {
    return new AssignedTask()
        .setSlaveHost(SLAVE_HOST)
        .setTaskId(taskId)
        .setTask(new TaskConfig()
            .setOwner(new Identity().setRole("role").setUser("user"))
            .setEnvironment("staging45")
            .setJobName(job)
            .setExecutorConfig(new ExecutorConfig("aurora", "config")));
  }
View Full Code Here

Examples of org.apache.aurora.gen.TaskConfig

  private IScheduledTask makeTask(String job, ScheduleStatus status, String host) {
    ScheduledTask task = new ScheduledTask()
        .setStatus(status)
        .setAssignedTask(new AssignedTask()
            .setTaskId(TASK_ID)
            .setTask(new TaskConfig()
                .setJobName(job)
                .setOwner(new Identity(ROLE_A, ROLE_A + "-user"))));
    if (Tasks.SLAVE_ASSIGNED_STATES.contains(status) || Tasks.isTerminated(status)) {
      task.getAssignedTask().setSlaveHost(host);
    }
View Full Code Here

Examples of org.apache.aurora.gen.TaskConfig

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

Examples of org.apache.aurora.gen.TaskConfig

    return IScheduledTask.build(new ScheduledTask()
        .setStatus(status)
        .setTaskEvents(ImmutableList.of(new TaskEvent(stateEnteredMs, status)))
        .setAssignedTask(new AssignedTask()
            .setTaskId(taskId)
            .setTask(new TaskConfig())));
  }
View Full Code Here

Examples of org.apache.aurora.gen.TaskConfig

    Task(IScheduledTask storedTask, Interner<TaskConfig, String> interner) {
      interner.removeAssociation(
          storedTask.getAssignedTask().getTask().newBuilder(),
          Tasks.id(storedTask));
      TaskConfig canonical = interner.addAssociation(
          storedTask.getAssignedTask().getTask().newBuilder(),
          Tasks.id(storedTask));
      ScheduledTask builder = storedTask.newBuilder();
      builder.getAssignedTask().setTask(canonical);
      this.storedTask = IScheduledTask.build(builder);
View Full Code Here

Examples of org.apache.aurora.gen.TaskConfig

  private static IScheduledTask makeTask(String id) {
    return IScheduledTask.build(new ScheduledTask()
        .setStatus(ScheduleStatus.PENDING)
        .setAssignedTask(new AssignedTask()
            .setTaskId(id)
            .setTask(new TaskConfig()
                .setOwner(new Identity("owner", "owner"))
                .setEnvironment("test")
                .setJobName("job"))));
  }
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.