Callable<FilteringScanSpecScanner> callable = new Callable<FilteringScanSpecScanner>() {
@Override
public FilteringScanSpecScanner call() throws IOException, HblException {
return new FilteringScanSpecScanner(ss, tpool, startSplitKey, endSplitKey, enforcedCuboidTableName);
}
};
filteringScannerConstructors.add(es.submit(callable));
}
List<FilteringScanSpecScanner> filteringScanners = new ArrayList<FilteringScanSpecScanner>();
// launch first scanner
// in the context of this thread
IOException lastExc = null;
try {
FilteringScanSpecScanner fscanner =
new FilteringScanSpecScanner(firstSpec, tpool, startSplitKey, endSplitKey, enforcedCuboidTableName);
closeables.addFirst(fscanner);
filteringScanners.add(fscanner);
} catch (IOException exc) {
lastExc = exc;
s_log.error(lastExc);
}
// wait for all other parallel dudes to complete.
for (Future<FilteringScanSpecScanner> fsss : filteringScannerConstructors) {
try {
FilteringScanSpecScanner fscanner = fsss.get();
closeables.addFirst(fscanner);
filteringScanners.add(fscanner);
} catch (ExecutionException exc) {
Throwable thr = exc.getCause();
if (thr instanceof IOException)