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

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

                Author: ASF GitHub Bot
            Created on: 13/Apr/21 20:33
            Start Date: 13/Apr/21 20:33
    Worklog Time Spent: 10m 
      Work Description: pgaref commented on a change in pull request #2123:
URL: https://github.com/apache/hive/pull/2123#discussion_r612757340



##########
File path: 
llap-tez/src/java/org/apache/hadoop/hive/llap/tezplugins/LlapTaskSchedulerService.java
##########
@@ -1954,6 +1911,37 @@ protected void schedulePendingTasks() throws 
InterruptedException {
           break;
         }
       }
+      // Finally take care of preemption requests that can unblock higher-pri 
tasks.
+      // This removes preemptable tasks from the runningList and sends out a 
preempt request to the system.
+      // Subsequent tasks will be scheduled once the de-allocate request for 
the preempted task is processed.
+      while (!preemptionCandidates.isEmpty()) {
+        TaskInfo toPreempt = preemptionCandidates.take();
+        // 1. task has not terminated
+        if (toPreempt.isGuaranteed != null) {
+          String host = toPreempt.getAssignedNode().getHost();
+           // 2. is currently assigned 3. no preemption pending on that Host
+          if (toPreempt.getState() == TaskInfo.State.ASSIGNED &&
+              (pendingPreemptionsPerHost.get(host) == null || 
pendingPreemptionsPerHost.get(host).intValue() == 0)) {
+            LOG.debug("Preempting task took {} ms {}", (clock.getTime() - 
toPreempt.getPreemptedTime()), toPreempt);

Review comment:
       Left it mostly to see how fast Preemption messages are propagated but 
its not super useful agree -- removed




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

For queries about this service, please contact Infrastructure at:
[email protected]


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

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

> Optimize LlapTaskSchedulerService::preemptTasksFromMap
> ------------------------------------------------------
>
>                 Key: HIVE-24472
>                 URL: https://issues.apache.org/jira/browse/HIVE-24472
>             Project: Hive
>          Issue Type: Sub-task
>            Reporter: Rajesh Balamohan
>            Assignee: Panagiotis Garefalakis
>            Priority: Major
>              Labels: pull-request-available
>         Attachments: Screenshot 2020-12-03 at 12.13.03 PM.png
>
>          Time Spent: 40m
>  Remaining Estimate: 0h
>
> !Screenshot 2020-12-03 at 12.13.03 PM.png|width=1063,height=571!
> speculativeTasks could possibly include node information to reduce CPU burn 
> in LlapTaskSchedulerService::preemptTasksFromMap
>  
>  



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

Reply via email to