use of org.apache.gobblin.util.executors.IteratorExecutor in project incubator-gobblin by apache.
the class ConfigBasedDatasetsFinder method executeItertorExecutor.
protected void executeItertorExecutor(Iterator<Callable<Void>> callableIterator) throws IOException {
try {
IteratorExecutor<Void> executor = new IteratorExecutor<>(callableIterator, this.threadPoolSize, ExecutorsUtils.newDaemonThreadFactory(Optional.of(log), Optional.of(this.getClass().getSimpleName())));
List<Either<Void, ExecutionException>> results = executor.executeAndGetResults();
IteratorExecutor.logFailures(results, log, 10);
} catch (InterruptedException ie) {
throw new IOException("Dataset finder is interrupted.", ie);
}
}
Aggregations