You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@yunikorn.apache.org by GitBox <gi...@apache.org> on 2022/12/13 16:32:10 UTC

[GitHub] [yunikorn-core] bgrams commented on a diff in pull request #474: [YUNIKORN-1468] Remove completedApplications from Queue

bgrams commented on code in PR #474:
URL: https://github.com/apache/yunikorn-core/pull/474#discussion_r1047409520


##########
pkg/webservice/handlers.go:
##########
@@ -534,15 +534,18 @@ func getQueueApplications(w http.ResponseWriter, r *http.Request) {
 		buildJSONErrorResponse(w, QueueDoesNotExists, http.StatusBadRequest)
 		return
 	}
-	apps := queue.GetCopyOfApps()
-	completedApps := queue.GetCopyOfCompletedApps()
-	appsDao := make([]*dao.ApplicationDAOInfo, 0, len(apps)+len(completedApps))
-	for _, app := range apps {
+
+	appsDao := make([]*dao.ApplicationDAOInfo, 0)
+	for _, app := range queue.GetCopyOfApps() {
 		appsDao = append(appsDao, getApplicationJSON(app))
 	}
-	for _, app := range completedApps {
-		appsDao = append(appsDao, getApplicationJSON(app))
+
+	for _, app := range partitionContext.GetCompletedApplications() {
+		if app.GetQueuePath() == queueName {
+			appsDao = append(appsDao, getApplicationJSON(app))
+		}
 	}
+

Review Comment:
   SGTM. Addressed in latest commits.



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