[ https://issues.apache.org/jira/browse/HIVE-23210?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17085689#comment-17085689 ]
Panagiotis Garefalakis commented on HIVE-23210: ----------------------------------------------- [~rajesh.balamohan] thanks for clearing this out! The equality comparison is now done in the final return statement: [https://github.com/apache/hive/pull/984/files#diff-f886866e2a28c028d82e35d2a4ebc288R77] The appropriate test case is added here: [https://github.com/apache/hive/pull/984/files#diff-ae97ef12823d4e9f10f596a95340cb3cR364] IMHO the equality scenario (equal waitTime and pending tasks) should be pretty rate but we could push the comparison further up (as Rajesh did in his patch) to avoid doing the ratio divisions. Thoughts? > 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 > Labels: pull-request-available > Attachments: HIVE-23210.01.patch, HIVE-23210.02.patch, > HIVE-23210.wip.patch, TestShortestJobFirstComparator.java > > Time Spent: 10m > Remaining Estimate: 0h > > 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)