pbacsko commented on code in PR #522:
URL: https://github.com/apache/yunikorn-core/pull/522#discussion_r1147772714


##########
pkg/scheduler/ugm/queue_tracker.go:
##########
@@ -151,3 +151,23 @@ func (qt *QueueTracker) 
getResourceUsageDAOInfo(parentQueuePath string) *dao.Res
 func (qt *QueueTracker) getRunningApplications() map[string]bool {
        return qt.runningApplications
 }
+
+func (qt *QueueTracker) cleanQueueTracker(queuePath string) {
+       idx := strings.Index(queuePath, configs.DOT)
+       childQueuePath := ""
+       if idx != -1 {
+               childQueuePath = queuePath[idx+1:]
+       }
+       childIndex := strings.Index(childQueuePath, configs.DOT)
+       immediateChildQueueName := childQueuePath
+       if childIndex != -1 {
+               immediateChildQueueName = childQueuePath[:childIndex]
+       }

Review Comment:
   I just added a function `getChildQueuePath()` which returns two string, 
essentially this part can be replaced with that call.



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