[ 
https://issues.apache.org/jira/browse/YUNIKORN-1090?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17497160#comment-17497160
 ] 

Wilfred Spiegelenburg commented on YUNIKORN-1090:
-------------------------------------------------

Can we make sure that the object we create in the si_helper code for the 
different actions (create/update/delete) is as small as possible. It does not 
make sense to pass lots of data from the shim to the core and ignore it:
 * create action: all data is used
 * update action: all data can be used
 * drain action: only NodeID is used
 * decommission action: only NodeID is used
 * drain_to_schedule: only NodeID is used

{{handleNodeRecovery}}, {{handleDrainNode}} and {{handleRestoreNode}} should 
also follow this principal in the cache.node.go. Should we even consider using 
the si_helper there and not build a NodeRequest there to remove code 
duplication?

> remove common.Node from the shim
> --------------------------------
>
>                 Key: YUNIKORN-1090
>                 URL: https://issues.apache.org/jira/browse/YUNIKORN-1090
>             Project: Apache YuniKorn
>          Issue Type: Improvement
>          Components: shim - kubernetes
>            Reporter: Wilfred Spiegelenburg
>            Assignee: Manikandan R
>            Priority: Major
>
> The node code seems overly complex with 3 types of nodes:
>  * cache.SchedulerNode
>  * framework.NodeInfo
>  * common.Node
> The first two we really need as one is the internal cache node, and the other 
> one is K8s node.
> The last one {{common.Node}} is only used for communication between the cache 
> and the si_helper code. We do not really need that object. It is short lived, 
> one function call, and for some of the calls we only really use one field 
> from the object.
> Creating the object and almost immediately dropping is GC overhead. It is 
> cheaper and simpler to just pass the field(s) directly into the si_helper as 
> we do for the application.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

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

Reply via email to