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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]