Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 12ac019

Browse files
committedNov 7, 2023
remove: nodechecks function as it is not being used
1 parent 280e750 commit 12ac019

File tree

1 file changed

+0
-46
lines changed

1 file changed

+0
-46
lines changed
 

‎pkg/controller/queuejob/queuejob_controller_ex.go

-46
Original file line numberDiff line numberDiff line change
@@ -922,52 +922,6 @@ func (qjm *XController) chooseAgent(ctx context.Context, qj *arbv1.AppWrapper) s
922922
return ""
923923
}
924924

925-
func (qjm *XController) nodeChecks(histograms map[string]*dto.Metric, aw *arbv1.AppWrapper) bool {
926-
ok := true
927-
allPods := qjm.GetAggregatedResourcesPerGenericItem(aw)
928-
929-
// Check only GPUs at this time
930-
var podsToCheck []*clusterstateapi.Resource
931-
932-
for _, pod := range allPods {
933-
if pod.GPU > 0 {
934-
podsToCheck = append(podsToCheck, pod)
935-
}
936-
}
937-
938-
gpuHistogram := histograms["gpu"]
939-
940-
if gpuHistogram != nil {
941-
buckets := gpuHistogram.Histogram.Bucket
942-
// Go through pods needing checking
943-
for _, gpuPod := range podsToCheck {
944-
945-
// Go through each bucket of the histogram to find a valid bucket
946-
bucketFound := false
947-
for _, bucket := range buckets {
948-
ub := bucket.UpperBound
949-
if ub == nil {
950-
klog.Errorf("Unable to get upperbound of histogram bucket.")
951-
continue
952-
}
953-
c := bucket.GetCumulativeCount()
954-
var fGPU float64 = float64(gpuPod.GPU)
955-
if fGPU < *ub && c > 1 {
956-
// Found a valid node
957-
bucketFound = true
958-
break
959-
}
960-
}
961-
if !bucketFound {
962-
ok = false
963-
break
964-
}
965-
}
966-
}
967-
968-
return ok
969-
}
970-
971925
// Thread to find queue-job(QJ) for next schedule
972926
func (qjm *XController) ScheduleNext(qj *arbv1.AppWrapper) {
973927
ctx := context.Background()

0 commit comments

Comments
 (0)
Please sign in to comment.