Package org.platformlayer.jobs.model

Examples of org.platformlayer.jobs.model.JobExecutionList


  @Override
  public Object runCommand() throws PlatformLayerClientException {
    PlatformLayerClient client = getPlatformLayerClient();

    JobExecutionList runs;
    if (jobId == null) {
      runs = client.listJobExecutions();
    } else {
      runs = client.listJobExecutions(jobId);
    }
View Full Code Here


    return new SimpleAutoCompleter();
  }

  @Override
  public void formatRaw(Object o, PrintWriter writer) {
    JobExecutionList jobs = (JobExecutionList) o;

    switch (getFormat()) {
    case JSON:
      JsonHelper<JobExecutionList> jsonHelper = JsonHelper.build(JobExecutionList.class);
      boolean formatted = true;
View Full Code Here

      }
    }
    List<JobLog> logs = Lists.newArrayList();

    if (Strings.isNullOrEmpty(executionId)) {
      JobExecutionList jobExecutions = client.listJobExecutions(jobId);

      List<JobExecutionData> runs = jobExecutions.getRuns();

      sort(runs);

      // TODO: Remove limit (or iterate)
      if (runs.size() > 10) {
View Full Code Here

    // TODO: System.out isn't quite right
    JobLogPrinter jobLogPrinter = new JobLogPrinter(new PrintWriter(System.out));

    if (Strings.isNullOrEmpty(executionId)) {
      JobExecutionList jobExecutions = client.listJobExecutions(jobId);

      JobExecutionData last = null;

      for (JobExecutionData execution : jobExecutions.getRuns()) {
        if (execution.getState() == JobState.PRESTART) {
          continue;
        }

        if (last == null) {
View Full Code Here

  }

  @Override
  public JobExecutionList listJobExecutions() throws PlatformLayerClientException {
    String relativePath = "jobs/runs";
    JobExecutionList jobs = doRequest(HttpMethod.GET, relativePath, JobExecutionList.class, Format.XML, null, null);

    return jobs;
  }
View Full Code Here

  }

  @Override
  public JobExecutionList listJobExecutions(String jobId) throws PlatformLayerClientException {
    String relativePath = "jobs/" + jobId + "/runs";
    JobExecutionList executions = doRequest(HttpMethod.GET, relativePath, JobExecutionList.class, Format.XML, null,
        null);
    return executions;
  }
View Full Code Here

      if (found == null) {
        // Assume completed?
        throw new IllegalStateException("Job not found in job list");
      }

      JobExecutionList executions = client.listJobExecutions(job.getJobKey().getItemIdString());
      JobExecutionData foundExecution = null;
      for (JobExecutionData candidate : executions) {
        if (jobKey.equals(candidate.getJobKey())) {
          foundExecution = candidate;
        }
View Full Code Here

  @GET
  @Path("runs")
  @Produces({ XML, JSON })
  public JobExecutionList getRuns() throws OpsException {
    List<JobExecutionData> jobList = jobRegistry.listExecutions(job.getJobKey());
    JobExecutionList runs = JobExecutionList.create(jobList);
    return runs;
  }
View Full Code Here

  @Path("runs")
  @Produces({ XML, JSON })
  public JobExecutionList getExecutions() throws OpsException {
    JobQuery jobQuery = JobQuery.build(getProject(), filterTarget);

    JobExecutionList executions = jobRegistry.listRecentExecutions(jobQuery);
    return executions;
  }
View Full Code Here

TOP

Related Classes of org.platformlayer.jobs.model.JobExecutionList

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.