Browse Source

return float

Achilleas Tzenetopoulos 5 years ago
parent
commit
b3705cbcbf

+ 2 - 2
kubernetes-v1.15.4/pkg/scheduler/algorithm/priorities/custom_resource_allocation.go

@@ -37,7 +37,7 @@ var (
 	//
 	// Details:
 	// (cpu((capacity-sum(requested))*10/capacity) + memory((capacity-sum(requested))*10/capacity))/2
-	CustomRequestedPriorityMap = customResourcePriority.PriorityMap
+	CustomRequestedPriorityMap = customResourcePriority.CustomPriorityMap
 )
 
 type Config struct {
@@ -207,7 +207,7 @@ func customResourceScorer(nodeName string) (float64, error) {
 			return 0, nil
 		}
 		res := calculateScore(results, customScoreFn)
-		klog.Infof("Node name %s, has score %d\n", nodeName, res)
+		klog.Infof("Node name %s, has score %v\n", nodeName, res)
 		return res, nil
 	} else {
 		klog.Infof("Error finding the uuid: %v", ok)