浏览代码

return float

Achilleas Tzenetopoulos 5 年之前
父节点
当前提交
b3705cbcbf
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      kubernetes-v1.15.4/pkg/scheduler/algorithm/priorities/custom_resource_allocation.go

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

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