pgaref commented on a change in pull request #2645:
URL: https://github.com/apache/hive/pull/2645#discussion_r709269471



##########
File path: 
llap-tez/src/java/org/apache/hadoop/hive/llap/tezplugins/LlapTaskSchedulerService.java
##########
@@ -1447,8 +1447,14 @@ 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());
+                  Set<LlapServiceInstance> instanceTypes = 
activeInstances.getByHost(host);

Review comment:
       Looks like this may happen when a node goes down between 
getResourceAvailability() call until selectHost() is triggered. Following the 
previous logic I believe the check should be performed at the same level as: 
   ```availableHostMap.containsKey(host)``` as these type of requests should 
not be checking for requestedHostsWillBecomeAvailable. Does it make sense?
   




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



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to