workers.remove(w); throw new GridComputeExecutionRejectedException("Failed to execute worker due to execution rejection.", e);
/** * @param job Rejected job. * @param sndReply {@code True} to send reply. */ private void rejectJob(GridJobWorker job, boolean sndReply) { GridException e = new GridComputeExecutionRejectedException("Job was cancelled before execution [taskSesId=" + job.getSession().getId() + ", jobId=" + job.getJobId() + ", job=" + job.getJob() + ']'); job.finishJob(null, e, sndReply); }
/** * @param jobWorker Job worker. * @return {@code True} if job has been submitted to pool. */ private boolean executeAsync(GridJobWorker jobWorker) { try { ctx.config().getExecutorService().execute(jobWorker); if (metricsUpdateFreq > -1L) startedJobsCnt.increment(); return true; } catch (RejectedExecutionException e) { // Remove from active jobs. activeJobs.remove(jobWorker.getJobId(), jobWorker); // Even if job was removed from another thread, we need to reject it // here since job has never been executed. GridException e2 = new GridComputeExecutionRejectedException("Job has been rejected " + "[jobSes=" + jobWorker.getSession() + ", job=" + jobWorker.getJob() + ']', e); if (metricsUpdateFreq > -1L) rejectedJobsCnt.increment(); jobWorker.finishJob(null, e2, true); } return false; }
handleException(new GridComputeExecutionRejectedException("Failed to execute task " + "due to thread pool execution rejection: " + taskName, e), fut);
GridException e2 = new GridComputeExecutionRejectedException( "Job was cancelled before execution [jobSes=" + jobWorker. getSession() + ", job=" + jobWorker.getJob() + ']');
msg = "Job got interrupted due to system stop (will attempt failover)."; ex = new GridComputeExecutionRejectedException(e);