sunilgovind commented on a change in pull request #223:
URL:
https://github.com/apache/incubator-yunikorn-core/pull/223#discussion_r531664917
##########
File path: pkg/scheduler/objects/queue.go
##########
@@ -401,6 +401,28 @@ func (sq *Queue) GetQueueInfos() dao.QueueDAOInfo {
return queueInfo
}
+func (sq *Queue) GetPartitionQueues() dao.PartitionQueueDAOInfo {
+ queueInfo := dao.PartitionQueueDAOInfo{}
+ if len(sq.children) > 0 {
+ for _, child := range sq.GetCopyOfChildren() {
+ queueInfo.Children = append(queueInfo.Children,
child.GetPartitionQueues())
+ }
+ }
+ queueInfo.QueueName = sq.GetQueuePath()
+ queueInfo.Status = sq.stateMachine.Current()
Review comment:
Is it safe to get this variable w/o readlock ?
##########
File path: pkg/webservice/handlers.go
##########
@@ -521,3 +522,27 @@ func updateConfiguration(conf string) (string, error) {
}
return "", fmt.Errorf("config plugin not found")
}
+
+func getPartitionQueues(w http.ResponseWriter, r *http.Request) {
+ vars := mux.Vars(r)
+ writeHeaders(w)
+ if len(vars) == 0 {
+ http.Error(w, "Mandatory parameters are missing in URL path.
Please check the usage documentation", http.StatusBadRequest)
Review comment:
Do we need to return from here?
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]