You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@yunikorn.apache.org by "FrankYang0529 (via GitHub)" <gi...@apache.org> on 2023/06/14 10:41:22 UTC

[GitHub] [yunikorn-core] FrankYang0529 commented on a diff in pull request #567: [YUNIKORN-1717] cache sortedQueues

FrankYang0529 commented on code in PR #567:
URL: https://github.com/apache/yunikorn-core/pull/567#discussion_r1229394087


##########
pkg/scheduler/objects/object_state.go:
##########
@@ -78,12 +78,25 @@ func NewObjectState() *fsm.FSM {
 		},
 		fsm.Callbacks{
 			"enter_state": func(_ context.Context, event *fsm.Event) {
+				var object string
+				switch v := event.Args[0].(type) {
+				case *Queue:
+					object = v.QueuePath
+				case string:
+					object = v

Review Comment:
   The `PartitionContext` also uses the same state machine. It gives a partition name.
   
   https://github.com/apache/yunikorn-core/blob/68a82820f0d7ff82f4d5d9b44629ae3660a184e1/pkg/scheduler/partition.go#L88
   
   https://github.com/apache/yunikorn-core/blob/68a82820f0d7ff82f4d5d9b44629ae3660a184e1/pkg/scheduler/partition.go#L268



-- 
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: reviews-unsubscribe@yunikorn.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org