Package org.apache.ambari.eventdb.model

Examples of org.apache.ambari.eventdb.model.Jobs


  @GET
  @Produces(MediaType.APPLICATION_JSON)
  @Path("/job")
  public Jobs getJobs(@QueryParam("workflowId") String workflowId, @DefaultValue("-1") @QueryParam("startTime") long minFinishTime,
      @DefaultValue("-1") @QueryParam("endTime") long maxStartTime) {
    Jobs jobs = new Jobs();
    PostgresConnector conn = null;
    try {
      conn = getConnector();
      if (workflowId != null)
        jobs.setJobs(conn.fetchJobDetails(workflowId));
      else if (maxStartTime >= minFinishTime)
        jobs.setJobs(conn.fetchJobDetails(minFinishTime, maxStartTime));
    } catch (IOException e) {
      LOG.error("Error interacting with RCA database ", e);
      jobs.setJobs(EMPTY_JOBS);
    } finally {
      if (conn != null) {
        conn.close();
      }
    }
View Full Code Here


 
  @GET
  @Produces(MediaType.APPLICATION_JSON)
  @Path("/job")
  public Jobs getJobs(@QueryParam("workflowId") String workflowId) {
    Jobs jobs = new Jobs();
    PostgresConnector conn = null;
    try {
      conn = getConnector();
      jobs.setJobs(conn.fetchJobDetails(workflowId));
    } catch (IOException e) {
      e.printStackTrace();
      jobs.setJobs(EMPTY_JOBS);
    } finally {
      if (conn != null) {
        conn.close();
      }
    }
View Full Code Here

  @GET
  @Produces(MediaType.APPLICATION_JSON)
  @Path("/job")
  public Jobs getJobs(@QueryParam("workflowId") String workflowId, @DefaultValue("-1") @QueryParam("startTime") long minFinishTime,
      @DefaultValue("-1") @QueryParam("endTime") long maxStartTime) {
    Jobs jobs = new Jobs();
    PostgresConnector conn = null;
    try {
      conn = getConnector();
      if (workflowId != null)
        jobs.setJobs(conn.fetchJobDetails(workflowId));
      else if (maxStartTime >= minFinishTime)
        jobs.setJobs(conn.fetchJobDetails(minFinishTime, maxStartTime));
    } catch (IOException e) {
      LOG.error("Error interacting with RCA database ", e);
      jobs.setJobs(EMPTY_JOBS);
    } finally {
      if (conn != null) {
        conn.close();
      }
    }
View Full Code Here

TOP

Related Classes of org.apache.ambari.eventdb.model.Jobs

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.