[ 
https://issues.apache.org/jira/browse/HIVE-25527?focusedWorklogId=651517&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-651517
 ]

ASF GitHub Bot logged work on HIVE-25527:
-----------------------------------------

                Author: ASF GitHub Bot
            Created on: 16/Sep/21 08:01
            Start Date: 16/Sep/21 08:01
    Worklog Time Spent: 10m 
      Work Description: pgaref commented on a change in pull request #2645:
URL: https://github.com/apache/hive/pull/2645#discussion_r709880097



##########
File path: 
llap-tez/src/java/org/apache/hadoop/hive/llap/tezplugins/LlapTaskSchedulerService.java
##########
@@ -1430,6 +1430,13 @@ private SelectHostResult selectHost(TaskInfo request, 
Map<String, List<NodeInfo>
         boolean requestedHostsWillBecomeAvailable = false;
         for (String host : requestedHosts) {
           prefHostCount++;
+
+          // Check if the host is removed from the registry after 
availableHostMap is created.
+          Set<LlapServiceInstance> activeInstancesByHost = 
activeInstances.getByHost(host);
+          if (activeInstancesByHost == null || 
activeInstancesByHost.isEmpty()) {
+            continue;
+          }
+
           // Pick the first host always. Weak attempt at cache affinity.
           if (availableHostMap.containsKey(host)) {

Review comment:
       I would avoid the continue statement above and modify the condition to:
   if (availableHostMap.containsKey(host) && activeInstancesByHost != null && 
!activeInstancesByHost.isEmpty())




-- 
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: gitbox-unsubscr...@hive.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
-------------------

    Worklog Id:     (was: 651517)
    Time Spent: 40m  (was: 0.5h)

> LLAP Scheduler task exits with fatal error if the executor node is down.
> ------------------------------------------------------------------------
>
>                 Key: HIVE-25527
>                 URL: https://issues.apache.org/jira/browse/HIVE-25527
>             Project: Hive
>          Issue Type: Sub-task
>          Components: HiveServer2
>            Reporter: mahesh kumar behera
>            Assignee: mahesh kumar behera
>            Priority: Major
>              Labels: pull-request-available
>          Time Spent: 40m
>  Remaining Estimate: 0h
>
> In case the executor host has gone down, activeInstances will be updated with 
> null. So we need to check for empty/null values before accessing it.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to