You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@yunikorn.apache.org by "Peter Bacsko (Jira)" <ji...@apache.org> on 2023/03/21 16:33:00 UTC
[jira] [Created] (YUNIKORN-1646) QueueTracker: extract common code from increaseTrackedResource/decreaseTrackedResource and remove getRunningApplications()
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: dev-unsubscribe@yunikorn.apache.org
For additional commands, e-mail: dev-help@yunikorn.apache.org