Package org.apache.ambari.view.pig.resources.jobs.models

Examples of org.apache.ambari.view.pig.resources.jobs.models.PigJob


   * Get single item
   */
  @DELETE
  @Path("{jobId}")
  public Response killJob(@PathParam("jobId") String jobId) throws IOException {
    PigJob job = null;
    try {
      job = getResourceManager().read(jobId);
    } catch (ItemNotFound itemNotFound) {
      return Response.status(404).build();
    }
View Full Code Here


  @GET
  @Path("{jobId}/notify")
  public Response jobCompletionNotification(@Context HttpHeaders headers,
                                            @Context UriInfo ui,
                                            @PathParam("jobId") final String jobId) {
    PigJob job = null;
    try {
      job = getResourceManager().ignorePermissions(new Callable<PigJob>() {
        public PigJob call() throws Exception {
          PigJob job = null;
          try {
            job = getResourceManager().read(jobId);
          } catch (ItemNotFound itemNotFound) {
            return null;
          }
View Full Code Here

  public Response jobExitCode(@Context HttpHeaders headers,
                              @Context UriInfo ui,
                              @PathParam("jobId") String jobId,
                              @PathParam("fileName") String fileName,
                              @QueryParam("page") Long page) {
    PigJob job = null;
    try {
      job = getResourceManager().read(jobId);
    } catch (ItemNotFound itemNotFound) {
      return Response.ok("No such job").status(404).build();
    }
    try {
      String filePath = job.getStatusDir() + "/" + fileName;
      LOG.debug("Reading file " + filePath);
      FilePaginator paginator = new FilePaginator(filePath, context);

      if (page == null)
        page = 0L;
View Full Code Here

      return badRequestResponse(e.getMessage());
    } catch (WebServiceException e) {
      return serverErrorResponse(e.getMessage());
    }

    PigJob job = null;

    try {
      job = getResourceManager().read(request.job.getId());
    } catch (ItemNotFound itemNotFound) {
      return Response.status(404).build();
View Full Code Here

  private void setupPolling() {
    List<PigJob> notCompleted = this.readAll(new FilteringStrategy() {
      @Override
      public boolean isConform(Indexed item) {
        PigJob job = (PigJob) item;
        return job.isInProgress();
      }
    });

    for(PigJob job : notCompleted) {
      JobPolling.pollJob(context, job);
View Full Code Here

  }

  @Override
  public PigJob create(PigJob object) {
    object.setStatus(PigJob.Status.SUBMITTING);
    PigJob job = super.create(object);
    LOG.debug("Submitting job...");

    try {
      submitJob(object);
    } catch (RuntimeException e) {
View Full Code Here

TOP

Related Classes of org.apache.ambari.view.pig.resources.jobs.models.PigJob

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.