[
https://issues.apache.org/jira/browse/HIVE-23210?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17084374#comment-17084374
]
Gopal Vijayaraghavan commented on HIVE-23210:
---------------------------------------------
{code}
// Compute knownPending tasks. selfAndUpstream indicates task counts for
current vertex and
// it's parent hierarchy. selfAndUpstreamComplete indicates how many of
these have completed.
int knownPending1 = fri1.getNumSelfAndUpstreamTasks() -
fri1.getNumSelfAndUpstreamCompletedTasks();
int knownPending2 = fri2.getNumSelfAndUpstreamTasks() -
fri2.getNumSelfAndUpstreamCompletedTasks();
// longer the wait time for an attempt wrt to its start time, higher the
priority it gets
long waitTime1 = fri1.getCurrentAttemptStartTime() -
fri1.getFirstAttemptStartTime();
long waitTime2 = fri2.getCurrentAttemptStartTime() -
fri2.getFirstAttemptStartTime();
if (waitTime1 == 0 || waitTime2 == 0) {
return knownPending1 - knownPending2;
}
{code}
So here, for a vertex with 1 task, for the first attempt, it will return 0;
It should return at least the FIFO order of getCurrentAttemptStartTime()
> Fix shortestjobcomparator when jobs submitted have 1 task their vertices
> ------------------------------------------------------------------------
>
> Key: HIVE-23210
> URL: https://issues.apache.org/jira/browse/HIVE-23210
> Project: Hive
> Issue Type: Improvement
> Reporter: Rajesh Balamohan
> Assignee: Panagiotis Garefalakis
> Priority: Major
> Attachments: TestShortestJobFirstComparator.java
>
>
> In latency sensitive queries, lots of jobs can have vertices with 1 task.
> Currently shortestjobcomparator does not work correctly and returns tasks in
> random order.
> [https://github.com/apache/hive/blob/master/llap-server/src/java/org/apache/hadoop/hive/llap/daemon/impl/comparator/ShortestJobFirstComparator.java#L51]
> This causes delay in the job runtime. I will attach a simple test case
> shortly.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)