@@ -922,52 +922,6 @@ func (qjm *XController) chooseAgent(ctx context.Context, qj *arbv1.AppWrapper) s
922
922
return ""
923
923
}
924
924
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
-
971
925
// Thread to find queue-job(QJ) for next schedule
972
926
func (qjm * XController ) ScheduleNext (qj * arbv1.AppWrapper ) {
973
927
ctx := context .Background ()
0 commit comments