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

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

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



##########
File path: 
llap-tez/src/java/org/apache/hadoop/hive/llap/tezplugins/LlapTaskSchedulerService.java
##########
@@ -1447,23 +1454,26 @@ private SelectHostResult selectHost(TaskInfo request, 
Map<String, List<NodeInfo>
                 if (request.shouldForceLocality()) {
                   requestedHostsWillBecomeAvailable = true;
                 } else {
-                  LlapServiceInstance inst = 
activeInstances.getByHost(host).stream().findFirst().get();
-                  NodeInfo nodeInfo = 
instanceToNodeMap.get(inst.getWorkerIdentity());
-                  if (nodeInfo != null && nodeInfo.getEnableTime() > 
request.getLocalityDelayTimeout()
-                      && nodeInfo.isDisabled() && nodeInfo.hadCommFailure()) {
-                    LOG.debug("Host={} will not become available within 
requested timeout", nodeInfo);
-                    // This node will likely be activated after the task 
timeout expires.
-                  } else {
-                    // Worth waiting for the timeout.
-                    requestedHostsWillBecomeAvailable = true;
+                  for (LlapServiceInstance inst : activeInstancesByHost) {
+                    NodeInfo nodeInfo = 
instanceToNodeMap.get(inst.getWorkerIdentity());
+                    if (nodeInfo == null) {
+                      LOG.warn("Null NodeInfo when attempting to get host {}", 
host);
+                      // Leave requestedHostWillBecomeAvailable as is. If some 
other host is found - delay,
+                      // else ends up allocating to a random host immediately.
+                      continue;

Review comment:
       we can avoid continue by changing second if to else if




-- 
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]


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

    Worklog Id:     (was: 651782)
    Time Spent: 1h 20m  (was: 1h 10m)

> 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: 1h 20m
>  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