This is an automated email from the ASF dual-hosted git repository.
sankarh pushed a commit to branch branch-3
in repository https://gitbox.apache.org/repos/asf/hive.git
The following commit(s) were added to refs/heads/branch-3 by this push:
new 008b5792ec8 HIVE-27550: Backport of HIVE-22113: Prevent LLAP shutdown
on AMReporter related RuntimeException
008b5792ec8 is described below
commit 008b5792ec8ba129b5a87fe71f523230c721b373
Author: Aman Raj <[email protected]>
AuthorDate: Mon Aug 14 12:58:25 2023 +0530
HIVE-27550: Backport of HIVE-22113: Prevent LLAP shutdown on AMReporter
related RuntimeException
Signed-off-by: Sankar Hariappan <[email protected]>
Closes (#4533)
---
.../hadoop/hive/llap/daemon/impl/TaskRunnerCallable.java | 13 ++++++++++---
1 file changed, 10 insertions(+), 3 deletions(-)
diff --git
a/llap-server/src/java/org/apache/hadoop/hive/llap/daemon/impl/TaskRunnerCallable.java
b/llap-server/src/java/org/apache/hadoop/hive/llap/daemon/impl/TaskRunnerCallable.java
index 7f436e23264..0fbaede7294 100644
---
a/llap-server/src/java/org/apache/hadoop/hive/llap/daemon/impl/TaskRunnerCallable.java
+++
b/llap-server/src/java/org/apache/hadoop/hive/llap/daemon/impl/TaskRunnerCallable.java
@@ -380,9 +380,16 @@ public class TaskRunnerCallable extends
CallableWithNdc<TaskRunner2Result> {
// If the task hasn't started - inform about fragment completion
immediately. It's possible for
// the callable to never run.
fragmentCompletionHanler.fragmentComplete(fragmentInfo);
- this.amReporter
- .unregisterTask(request.getAmHost(), request.getAmPort(),
- fragmentInfo.getQueryInfo().getQueryIdentifier(), ta);
+
+ try {
+ this.amReporter
+ .unregisterTask(request.getAmHost(), request.getAmPort(),
+ fragmentInfo.getQueryInfo().getQueryIdentifier(), ta);
+ } catch (Throwable thr) {
+ // unregisterTask can throw a RuntimeException (i.e. if task
attempt not found)
+ // this brings down LLAP daemon if exception is not caught here
+ LOG.error("Unregistering task from AMReporter failed", thr);
+ }
}
}
} else {