예제 #1
0
 /** {@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).");
 }
예제 #2
0
 /** {@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).");
 }
예제 #3
0
 /** {@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).");
 }
예제 #4
0
 /** {@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).");
 }
예제 #5
0
 /** {@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).");
 }