public void cancel() throws Exception { if(_runningJob != null) _runningJob.killJob(); }
/** * Kill a job. */ public void killJob(JobID jobid) throws IOException { RunningJob rj = getJob(jobid); if(rj == null) { return; } rj.killJob(); }
private void killJob() { boolean needToKillJob = false; synchronized(this) { if (rj != null && !jobKilled) { jobKilled = true; needToKillJob = true; } } if (needToKillJob) { try { rj.killJob(); } catch (Exception e) { LOG.warn("failed to kill job " + rj.getID(), e); } } } }
public static void killRunningJobs() { synchronized (runningJobs) { for (RunningJob rj : runningJobs) { try { System.err.println("killing job with: " + rj.getID()); rj.killJob(); } catch (Exception e) { LOG.warn("Failed to kill job", e); System.err.println("Failed to kill job: "+ rj.getID()); // do nothing } } } }
public static void killRunningJobs() { synchronized (runningJobs) { for (RunningJob rj : runningJobs) { try { System.err.println("killing job with: " + rj.getID()); rj.killJob(); } catch (Exception e) { LOG.warn("Failed to kill job", e); System.err.println("Failed to kill job: "+ rj.getID()); // do nothing } } } }
@Override public void shutdown() { super.shutdown(); if (rj != null) { try { rj.killJob(); } catch (Exception e) { LOG.warn("failed to kill job " + rj.getID(), e); } rj = null; } }
rj.killJob(); continue;
rj.killJob(); continue;
@Override public void run() { try { if(job != null) job.killJob(); } catch (IOException e) { e.printStackTrace(); } } };
@Override public void run() { try { if(job != null) job.killJob(); } catch (IOException e) { e.printStackTrace(); } } };
/** * Kill a job. */ public void killJob(JobID jobid) throws IOException { RunningJob rj = getJob(jobid); if(rj == null) { return; } rj.killJob(); }
/** * Kill a job. */ public void killJob(JobID jobid) throws IOException { RunningJob rj = getJob(jobid); if(rj == null) { return; } rj.killJob(); }
protected void internalBlockOnStop() throws IOException { if( runningJob != null && !runningJob.isComplete() ) runningJob.killJob(); }
/** * Kill the running job. Blocks until all job tasks have been * killed as well. If the job is no longer running, it simply returns. * * @throws IOException */ public void killJob() throws IOException { ensureState(JobState.RUNNING); info.killJob(); }