deniskuzZ commented on code in PR #5845:
URL: https://github.com/apache/hive/pull/5845#discussion_r2144498891
##########
ql/src/java/org/apache/hadoop/hive/ql/exec/vector/mapjoin/fast/VectorMapJoinFastHashTableLoader.java:
##########
@@ -307,9 +320,19 @@ public void load(MapJoinTableContainer[] mapJoinTables,
LOG.info("Finished loading the queue for input: {} waiting {} minutes
for TPool shutdown", inputName, 2);
addQueueDoneSentinel();
loadExecService.shutdown();
-
- if (!loadExecService.awaitTermination(2, TimeUnit.MINUTES)) {
+ try {
+ CompletableFuture.allOf(loaderTasks.toArray(new
CompletableFuture[0]))
+ .get(2, TimeUnit.MINUTES);
+ } catch (TimeoutException e) {
throw new HiveException("Failed to complete the hash table loader.
Loading timed out.");
+ } catch (ExecutionException e) {
+ throw new HiveException("One of the loader threads failed",
e.getCause());
+ } catch (InterruptedException e) {
Review Comment:
you already have handling for `InterruptedException` and `loadExecService`
shutdown
[here](https://github.com/apache/hive/pull/5845/files#diff-573e1d79d59124631df039ba5fedfd037457f3e3c3b8fb5e349b4086191bc197R353-R363)
no need to duplicate
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]