Repository: hive Updated Branches: refs/heads/master 98ec28eda -> fe477b59e
HIVE-17281: LLAP external client not properly handling KILLED notification that occurs when a fragment is rejected (Jason Dere, reviewed by Sergey Shelukhin) Project: http://git-wip-us.apache.org/repos/asf/hive/repo Commit: http://git-wip-us.apache.org/repos/asf/hive/commit/fe477b59 Tree: http://git-wip-us.apache.org/repos/asf/hive/tree/fe477b59 Diff: http://git-wip-us.apache.org/repos/asf/hive/diff/fe477b59 Branch: refs/heads/master Commit: fe477b59eac2a003e6091d3a8b47738056fbae27 Parents: 98ec28e Author: Jason Dere <jd...@hortonworks.com> Authored: Fri Aug 11 13:37:20 2017 -0700 Committer: Jason Dere <jd...@hortonworks.com> Committed: Fri Aug 11 13:37:20 2017 -0700 ---------------------------------------------------------------------- .../llap/ext/LlapTaskUmbilicalExternalClient.java | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/hive/blob/fe477b59/llap-client/src/java/org/apache/hadoop/hive/llap/ext/LlapTaskUmbilicalExternalClient.java ---------------------------------------------------------------------- diff --git a/llap-client/src/java/org/apache/hadoop/hive/llap/ext/LlapTaskUmbilicalExternalClient.java b/llap-client/src/java/org/apache/hadoop/hive/llap/ext/LlapTaskUmbilicalExternalClient.java index ee7d0d3..aa94e54 100644 --- a/llap-client/src/java/org/apache/hadoop/hive/llap/ext/LlapTaskUmbilicalExternalClient.java +++ b/llap-client/src/java/org/apache/hadoop/hive/llap/ext/LlapTaskUmbilicalExternalClient.java @@ -488,16 +488,20 @@ public class LlapTaskUmbilicalExternalClient implements Closeable { @Override public void taskKilled(TezTaskAttemptID taskAttemptId) throws IOException { String taskAttemptIdString = taskAttemptId.toString(); - LOG.error("Task killed - " + taskAttemptIdString); LlapTaskUmbilicalExternalClient client = registeredClients.get(taskAttemptIdString); if (client != null) { - try { - client.unregisterClient(); - if (client.responder != null) { - client.responder.taskKilled(taskAttemptId); + if (client.requestInfo.state == RequestState.PENDING) { + LOG.debug("Ignoring task kill for {}, request is still in pending state", taskAttemptIdString); + } else { + try { + LOG.error("Task killed - " + taskAttemptIdString); + client.unregisterClient(); + if (client.responder != null) { + client.responder.taskKilled(taskAttemptId); + } + } catch (Exception err) { + LOG.error("Error during responder execution", err); } - } catch (Exception err) { - LOG.error("Error during responder execution", err); } } else { LOG.info("Received task killed notification for task which is not currently being tracked: " + taskAttemptId);