jdbc-protolib/src/main/java/com/streamsets/pipeline/stage/origin/jdbc/AbstractTableJdbcSource.java
private void checkWorkerStatus(ExecutorCompletionService<Future> completionService) throws StageException {
    Future future = completionService.poll();
    if (future != null) {
      try {
        future.get();
      } catch (InterruptedException e) {
        LOG.error("Thread interrupted", e);
      } catch (ExecutionException e) {
        Throwable cause = Throwables.getRootCause(e);
        if (cause != null && cause instanceof StageException) {
          throw (StageException) cause;
        } else {
          LOG.error("Internal Error", e);
          throw new StageException(JdbcErrors.JDBC_75, e.toString(), e);
        }
      }
    }
  }
private void checkWorkerStatus(ExecutorCompletionService<Future> completionService) throws StageException {
    Future future = completionService.poll();
    if (future != null) {
      try {
        future.get();
      } catch (InterruptedException e) {
        LOG.error("Thread interrupted", e);
      } catch (ExecutionException e) {
        Throwable cause = Throwables.getRootCause(e);
        if (cause != null && cause instanceof StageException) {
          throw (StageException) cause;
        } else {
          LOG.error("Internal Error", e);
          throw new StageException(JdbcErrors.JDBC_75, e.toString(), e);
        }
      }
    }
  }
private void checkWorkerStatus ( ExecutorCompletionService < Future > completionService ) throws StageException { Future future = completionService . poll ( ) ; if ( future != null ) { try { future . get ( ) ; } catch ( InterruptedException e ) { LOG . error ( "Thread interrupted" , e ) ; } catch ( ExecutionException e ) { Throwable cause = Throwables . getRootCause ( e ) ; if ( cause != null && cause instanceof StageException ) { throw ( StageException ) cause ; } else { LOG . error ( "Internal Error" , e ) ; throw new StageException ( JdbcErrors . JDBC_75 , e . toString ( ) , e ) ; } } } }
Checks whether any of the {@link TableJdbcRunnable} workers completed
and whether there is any error that needs to be handled from them.
@param completionService {@link ExecutorCompletionService} used to detect completion
@throws StageException if {@link StageException} is thrown by the workers (if the error handling is stop pipeline)
Checks whether any of the {