chia7712 commented on code in PR #900:
URL: https://github.com/apache/yunikorn-core/pull/900#discussion_r1651021365


##########
pkg/scheduler/objects/application_state.go:
##########
@@ -77,6 +77,7 @@ func (as applicationState) String() string {
        return [...]string{"New", "Accepted", "Starting", "Running", 
"Rejected", "Completing", "Completed", "Failing", "Failed", "Expired", 
"Resuming"}[as]
 }
 
+//nolint:funlen
 func NewAppState() *fsm.FSM {

Review Comment:
   could you please do the similar refactor 
(https://github.com/apache/yunikorn-k8shim/pull/861)?



##########
pkg/scheduler/partition.go:
##########
@@ -1207,6 +1207,8 @@ func (pc *PartitionContext) calculateNodesResourceUsage() 
map[string][]int {
 
 // removeAllocation removes the referenced allocation(s) from the applications 
and nodes
 // NOTE: this is a lock free call. It must NOT be called holding the 
PartitionContext lock.
+//
+//nolint:funlen
 func (pc *PartitionContext) removeAllocation(release *si.AllocationRelease) 
([]*objects.Allocation, *objects.Allocation) {

Review Comment:
   It seems we can extract the code of generating `released` into a separate 
method. WDYT?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to