Package org.apache.hadoop.mapred

Examples of org.apache.hadoop.mapred.RunningJob.killJob()


        if (ctxCreated) {
          ctx.clear();
        }
        if (rj != null) {
          if (returnVal != 0) {
            rj.killJob();
          }
          HadoopJobExecHelper.runningJobs.remove(rj);
          jobID = rj.getID().toString();
        }
        ColumnTruncateMapper.jobClose(outputPath, success, job, console,
View Full Code Here


        if (ctxCreated) {
          ctx.clear();
        }
        if (rj != null) {
          if (returnVal != 0) {
            rj.killJob();
          }
          HadoopJobExecHelper.runningJobs.remove(rj);
          jobID = rj.getID().toString();
        }
        RCFileMergeMapper.jobClose(outputPath, success, job, console,
View Full Code Here

        if (ctxCreated) {
          ctx.clear();
        }
        if (rj != null) {
          if (returnVal != 0) {
            rj.killJob();
          }
          HadoopJobExecHelper.runningJobs.remove(rj);
          jobID = rj.getID().toString();
        }
      } catch (Exception e) {
View Full Code Here

      RunningJob jobToKill = jc.getJob(new JobID(jobToKillInfo.jobidS, jobToKillInfo.jobidN));
      if (null == jobToKill) {
        _logger.error("Couldn't find this job: " + jobToKillInfo.jobidS + "_" + jobToKillInfo.jobidN +  " / " + new JobID(jobToKillInfo.jobidS, jobToKillInfo.jobidN).toString());
        return false;
      }
      jobToKill.killJob();
     
      int nRuns = 0;
      while (!checkRunningJobs(jobToKillInfo)) {
        try { Thread.sleep(5000); } catch (Exception e) {}
        if (++nRuns > 24) { // bail out after 2 minutes
View Full Code Here

            RunningJob job = jc.getJob(id);
            if (job == null)
                System.out.println("Job with id " + jobid + " is not active");
            else
            {
                job.killJob();
                log.info("Kill " + id + " submitted.");
            }
        }
    }
View Full Code Here

                log.debug("Receive kill signal");
                if (jc!=null) {
                    for (Job job : jc.getRunningJobs()) {
                        RunningJob runningJob = job.getJobClient().getJob(job.getAssignedJobID());
                        if (runningJob!=null)
                            runningJob.killJob();
                        log.info("Job " + job.getAssignedJobID() + " killed");
                    }
                }
            } catch (Exception e) {
                log.warn("Encounter exception on cleanup:" + e);
View Full Code Here

    // Try operations as an authorized user, who is a queue administrator.
    verifyViewJobAsAuthorizedUser(myConf, jobId, qAdmin);

    // Clean up the job
    job.killJob();
  }

  /**
   * Submits a sleep job with 1 map task that runs for a long time(2000 sec)
   * @param clusterConf
View Full Code Here

          fail("Unexpected.. exception.. " + ioe);
        }

        // Test authorization success with killJob
        try {
          myJob.killJob();
        } catch (IOException ioe) {
          fail("Unexpected.. exception.. " + ioe);
        }

        return null;
View Full Code Here

        assertNotNull("Job " + jobId + " is not known to the JobTracker!",
            myJob);

        // Tests authorization failure with killJob
        try {
          myJob.killJob();
          fail("AccessControlException expected..");
        } catch (IOException ioe) {
          assertTrue(ioe.getMessage().contains("AccessControlException"));
        }
View Full Code Here

    final JobID jobId = job.getID();

    // Kill the job and wait till it is actually killed so that it is written to
    // CompletedJobStore
    job.killJob();
    while (job.getJobState() != JobStatus.KILLED) {
      LOG.info("Waiting for the job to be killed successfully..");
      Thread.sleep(200);
    }
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.