Peter Bacsko created YUNIKORN-1646:
--------------------------------------

             Summary: QueueTracker: extract common code from 
increaseTrackedResource/decreaseTrackedResource and remove 
getRunningApplications()
                 Key: YUNIKORN-1646
                 URL: https://issues.apache.org/jira/browse/YUNIKORN-1646
             Project: Apache YuniKorn
          Issue Type: Sub-task
          Components: core - scheduler
            Reporter: Peter Bacsko
            Assignee: Peter Bacsko


In QueueTracker, there's a code which is repeated:

{noformat}
        idx := strings.Index(queuePath, configs.DOT)
        childQueuePath := ""
        if idx != -1 {
                childQueuePath = queuePath[idx+1:]
        }

        childIndex := strings.Index(childQueuePath, configs.DOT)
        immediateChildQueueName := childQueuePath
        if childIndex != -1 {
                immediateChildQueueName = childQueuePath[:childIndex]
        }
{noformat}

Extract this to a function to avoid duplication.

Also, the method {{getRunningApplications()}} is only invoked from tests and 
can be removed.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to