Peter Bacsko created YUNIKORN-2724:
--------------------------------------

             Summary: Improve the signature of methods notifyTaskComplete() and 
ensureAppAndTaskCreated()
                 Key: YUNIKORN-2724
                 URL: https://issues.apache.org/jira/browse/YUNIKORN-2724
             Project: Apache YuniKorn
          Issue Type: Improvement
          Components: shim - kubernetes
            Reporter: Peter Bacsko


>From the review [https://github.com/apache/yunikorn-k8shim/pull/864]

"I also think we need to change the signature for {{notifyTaskComplete(string, 
string)}} to {{notifyTaskComplete(*Application, string)}} Probably better to 
use a separate jira for that as it flows through into {{NotifyTaskComplete()}} 
and some tests. The 2 tests have the application pointer already. It removes a 
number of extra getApplication() calls we really do not need.
Similar for {{ensureAppAndTaskCreated()}} which is only ever called from this 
function. Add a parameter to it to make it: {{ensureAppAndTaskCreated(*v1.Pod, 
*Application)}} and only execute application creation {{{}if app == nil{}}}. 
This can be either in this jira or in a separate one."

That is, optimize the methods so that we avoid unnecessary {{GetApplication()}} 
calls.



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