You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@yunikorn.apache.org by "Wilfred Spiegelenburg (Jira)" <ji...@apache.org> on 2022/12/05 06:09:00 UTC

[jira] [Created] (YUNIKORN-1445) partition cleanup: code refactor

Wilfred Spiegelenburg created YUNIKORN-1445:
-----------------------------------------------

             Summary: partition cleanup: code refactor
                 Key: YUNIKORN-1445
                 URL: https://issues.apache.org/jira/browse/YUNIKORN-1445
             Project: Apache YuniKorn
          Issue Type: Improvement
          Components: core - common
            Reporter: Wilfred Spiegelenburg
            Assignee: Wilfred Spiegelenburg


Multiple issues:

GetAppsInTerminatedState is dead code should be removed

GetAppsByState, GetRejectedAppsByState & GetCompletedAppsByState: only called from cleanupExpiredApps with the expired state, and we only need the applicationID list (which is the key in the map) not the whole app.

None of those 3 methods should be exported.

cleanupExpiredApps: should only request the keys for the map and not the objects itself, removes accessing the application to get the ID during the iteration. Removes one indirection to get the ID and a possible race condition.



--
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