/** {@inheritDoc} */ @Override public IgniteInternalFuture<?> submit(HadoopJobId jobId, HadoopJobInfo jobInfo) { if (busyLock.enterBusy()) { try { return proc.submit(jobId, jobInfo); } finally { busyLock.leaveBusy(); } } else throw new IllegalStateException("Failed to submit job (grid is stopping)."); }
/** {@inheritDoc} */ @Override public boolean kill(HadoopJobId jobId) throws IgniteCheckedException { if (busyLock.enterBusy()) { try { return proc.kill(jobId); } finally { busyLock.leaveBusy(); } } else throw new IllegalStateException("Failed to kill job (grid is stopping)."); }
/** {@inheritDoc} */ @Override public HadoopJobId nextJobId() { if (busyLock.enterBusy()) { try { return proc.nextJobId(); } finally { busyLock.leaveBusy(); } } else throw new IllegalStateException("Failed to get next job ID (grid is stopping)."); }
/** {@inheritDoc} */ @Nullable @Override public HadoopCounters counters(HadoopJobId jobId) throws IgniteCheckedException { if (busyLock.enterBusy()) { try { return proc.counters(jobId); } finally { busyLock.leaveBusy(); } } else throw new IllegalStateException("Failed to get job counters (grid is stopping)."); }
/** {@inheritDoc} */ @Nullable @Override public IgniteInternalFuture<?> finishFuture(HadoopJobId jobId) throws IgniteCheckedException { if (busyLock.enterBusy()) { try { return proc.finishFuture(jobId); } finally { busyLock.leaveBusy(); } } else throw new IllegalStateException("Failed to get job finish future (grid is stopping)."); }