소스 검색

customize influxdb results

Achilleas Tzenetopoulos 5 년 전
부모
커밋
bb54b45d7e
1개의 변경된 파일2개의 추가작업 그리고 1개의 파일을 삭제
  1. 2 1
      kubernetes-v1.15.4/pkg/scheduler/algorithm/priorities/custom_resource_allocation.go

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

@@ -17,6 +17,7 @@ limitations under the License.
 package priorities
 
 import (
+	"encoding/json"
 	"fmt"
 	"os"
 
@@ -121,7 +122,7 @@ func customResourceScorer(nodeName string) int64 {
 		command := fmt.Sprintf("SELECT ipc from system_metrics where uuid = '%s' order by time desc limit 1", curr_uuid)
 		q := client.NewQuery(command, "evolve", "")
 		if response, err := c.Query(q); err == nil && response.Error() == nil {
-			klog.Infof("%v", response.Results[0].Series[0].Values[0][1])
+			klog.Infof("%v", response.Results[0].Series[0].Values[0][1].(json.Number))
 		} else if err != nil {
 			klog.Infof("Error: %v", err)
 		}