You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hive.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2021/05/25 10:53:00 UTC

[jira] [Work logged] (HIVE-24537) Optimise locking in LlapTaskSchedulerService

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

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

                Author: ASF GitHub Bot
            Created on: 25/May/21 10:52
            Start Date: 25/May/21 10:52
    Worklog Time Spent: 10m 
      Work Description: maheshk114 commented on a change in pull request #2224:
URL: https://github.com/apache/hive/pull/2224#discussion_r638673230



##########
File path: llap-tez/src/java/org/apache/hadoop/hive/llap/tezplugins/LlapTaskSchedulerService.java
##########
@@ -1168,16 +1165,13 @@ public void allocateTask(Object task, Resource capability, ContainerId container
         capability, null, null, clock.getTime(), id);
     LOG.info("Received allocateRequest. task={}, priority={}, capability={}, containerId={}",
         task, priority, capability, containerId);
-    writeLock.lock();
-    try {
-      if (!dagRunning && metrics != null && id != null) {
+    if (!dagRunning) {
+      if (metrics != null && id != null) {

Review comment:
       One issue i can see is , we are setting the dagRunning to true without setting any stats. So the stats reading thread may get some junk value for numRequestedAllocations etc. is it fine ?




-- 
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:
users@infra.apache.org


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

    Worklog Id:     (was: 601627)
    Time Spent: 0.5h  (was: 20m)

> Optimise locking in LlapTaskSchedulerService
> --------------------------------------------
>
>                 Key: HIVE-24537
>                 URL: https://issues.apache.org/jira/browse/HIVE-24537
>             Project: Hive
>          Issue Type: Sub-task
>          Components: llap
>            Reporter: Rajesh Balamohan
>            Assignee: Panagiotis Garefalakis
>            Priority: Major
>              Labels: pull-request-available
>         Attachments: Screenshot 2020-12-15 at 11.41.49 AM.png
>
>          Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> 1. Read lock should suffice for "notifyStarted()".
> 2. Locking in "allocateTask()" can be optimised. 
> 3. Optimize preemptTasks() & preemptTasksFromMap(). This would help in reducing the codepath with writeLock. Currently, it iterates through all tasks.
>  
>   !Screenshot 2020-12-15 at 11.41.49 AM.png|width=847,height=446!



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