Examples of ScheduledTask


Examples of org.apache.aurora.gen.ScheduledTask

    return LogEntry.transaction(
        new Transaction(ImmutableList.copyOf(ops), storageConstants.CURRENT_SCHEMA_VERSION));
  }

  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.ScheduledTask

        .setTasks(ImmutableSet.<ScheduledTask>builder().add(tasks).build())
        .setLocks(ImmutableSet.<Lock>of());
  }

  private static ScheduledTask makeTask(String taskId) {
    return new ScheduledTask().setAssignedTask(
        new AssignedTask()
            .setTaskId(taskId)
            .setTask(new TaskConfig()
                .setJobName("job-" + taskId)
                .setEnvironment("test")
View Full Code Here

Examples of org.apache.aurora.gen.ScheduledTask

            "jobManager",
            new JobConfiguration().setKey(new JobKey("owner", "env", "jobA")))));
    snapshot.setQuotaConfigurations(
        ImmutableSet.of(new QuotaConfiguration("roleA", new ResourceAggregate(10, 1024, 1024))));
    snapshot.setSchedulerMetadata(new SchedulerMetadata().setFrameworkId("frameworkId"));
    snapshot.setTasks(ImmutableSet.of(new ScheduledTask()));
    return snapshot;
  }
View Full Code Here

Examples of org.apache.aurora.gen.ScheduledTask

  }

  @Test
  public void testCreateAndRestoreNewSnapshot() {
    ImmutableSet<IScheduledTask> tasks = ImmutableSet.of(
        IScheduledTask.build(new ScheduledTask().setStatus(ScheduleStatus.PENDING)));
    Set<QuotaConfiguration> quotas =
        ImmutableSet.of(
            new QuotaConfiguration("steve", ResourceAggregates.none().newBuilder()));
    IHostAttributes attribute = IHostAttributes.build(new HostAttributes("host",
        ImmutableSet.of(new Attribute("attr", ImmutableSet.of("value")))));
View Full Code Here

Examples of org.apache.roller.model.ScheduledTask

        if (hourlyString != null && hourlyString.trim().length() > 0) {
            String[] hourlyTasks = StringUtils.stripAll(
                    StringUtils.split(hourlyString, ",") );
            for (int i=0; i<hourlyTasks.length; i++) {
                mLogger.info("Setting hourly task: "+hourlyTasks[i]);
                ScheduledTask task =
                        (ScheduledTask)Class.forName(hourlyTasks[i]).newInstance();
                task.init(roller, mContext.getRealPath("/"));
                roller.getThreadManager().scheduleHourlyTimerTask((TimerTask)task);
            }
        }
       
        // setup the daily tasks
        String dailyString = RollerConfig.getProperty("tasks.daily");
        if (dailyString != null && dailyString.trim().length() > 0) {
            String[] dailyTasks = StringUtils.stripAll(
                    StringUtils.split(dailyString, ",") );
            for (int j=0; j<dailyTasks.length; j++) {
                mLogger.info("Setting daily task: "+dailyTasks[j]);
                ScheduledTask task =
                        (ScheduledTask)Class.forName(dailyTasks[j]).newInstance();
                task.init(roller, mContext.getRealPath("/"));
                roller.getThreadManager().scheduleDailyTimerTask((TimerTask)task);
            }
        }
    }
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.