This is an automated email from the ASF dual-hosted git repository.

bslim pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/hive.git


The following commit(s) were added to refs/heads/master by this push:
     new bd42f23  HIVE-22113: Prevent LLAP shutdown on AMReporter related 
RuntimeException (Oliver Draese via Jason and Slim B)
bd42f23 is described below

commit bd42f23d49d9948f690a14675d6e77830adddfef
Author: Oliver Draese <odra...@cloudera.com>
AuthorDate: Thu Aug 15 18:38:23 2019 -0700

    HIVE-22113: Prevent LLAP shutdown on AMReporter related RuntimeException 
(Oliver Draese via Jason and Slim B)
---
 .../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 5dc6282..3619252 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 {

Reply via email to