|
|
|
@@ -6,6 +6,7 @@ import ( |
|
|
|
"errors" |
|
|
|
"fmt" |
|
|
|
"github.com/zeromicro/go-zero/core/logx" |
|
|
|
"gitlink.org.cn/JointCloud/pcm-coordinator/internal/scheduler/entity" |
|
|
|
"gitlink.org.cn/JointCloud/pcm-coordinator/internal/scheduler/schedulers" |
|
|
|
"gitlink.org.cn/JointCloud/pcm-coordinator/internal/scheduler/schedulers/option" |
|
|
|
"gitlink.org.cn/JointCloud/pcm-coordinator/internal/scheduler/service/executor" |
|
|
|
@@ -147,10 +148,7 @@ func updateClustersByScheduledDatas(taskId int64, clustersWithDataDistributes *C |
|
|
|
if c.JsonData == "" { |
|
|
|
continue |
|
|
|
} |
|
|
|
jsonData := struct { |
|
|
|
Name string `json:"name"` |
|
|
|
Id string `json:"id"` |
|
|
|
}{} |
|
|
|
jsonData := entity.JsonData{} |
|
|
|
err := json.Unmarshal([]byte(c.JsonData), &jsonData) |
|
|
|
if err != nil { |
|
|
|
return nil, fmt.Errorf("pass-in jsonData convert failed, task %d, cluster %s, datatype: %s", taskId, cluster.ClusterId, "dataset") |
|
|
|
@@ -169,10 +167,7 @@ func updateClustersByScheduledDatas(taskId int64, clustersWithDataDistributes *C |
|
|
|
if c.JsonData == "" { |
|
|
|
continue |
|
|
|
} |
|
|
|
jsonData := struct { |
|
|
|
Name string `json:"name"` |
|
|
|
Id string `json:"id"` |
|
|
|
}{} |
|
|
|
jsonData := entity.JsonData{} |
|
|
|
err := json.Unmarshal([]byte(c.JsonData), &jsonData) |
|
|
|
if err != nil { |
|
|
|
return nil, fmt.Errorf("pass-in jsonData convert failed, task %d, cluster %s, datatype: %s", taskId, cluster.ClusterId, "image") |
|
|
|
@@ -191,10 +186,7 @@ func updateClustersByScheduledDatas(taskId int64, clustersWithDataDistributes *C |
|
|
|
if c.JsonData == "" { |
|
|
|
continue |
|
|
|
} |
|
|
|
jsonData := struct { |
|
|
|
Name string `json:"name"` |
|
|
|
Id string `json:"id"` |
|
|
|
}{} |
|
|
|
jsonData := entity.JsonData{} |
|
|
|
err := json.Unmarshal([]byte(c.JsonData), &jsonData) |
|
|
|
if err != nil { |
|
|
|
return nil, fmt.Errorf("pass-in jsonData convert failed, task %d, cluster %s, datatype: %s", taskId, cluster.ClusterId, "code") |
|
|
|
@@ -213,10 +205,7 @@ func updateClustersByScheduledDatas(taskId int64, clustersWithDataDistributes *C |
|
|
|
if c.JsonData == "" { |
|
|
|
continue |
|
|
|
} |
|
|
|
jsonData := struct { |
|
|
|
Name string `json:"name"` |
|
|
|
Id string `json:"id"` |
|
|
|
}{} |
|
|
|
jsonData := entity.JsonData{} |
|
|
|
err := json.Unmarshal([]byte(c.JsonData), &jsonData) |
|
|
|
if err != nil { |
|
|
|
return nil, fmt.Errorf("pass-in jsonData convert failed, task %d, cluster %s, datatype: %s", taskId, cluster.ClusterId, "model") |
|
|
|
@@ -240,10 +229,7 @@ func updateClustersByScheduledDatas(taskId int64, clustersWithDataDistributes *C |
|
|
|
if c.JsonData == "" { |
|
|
|
continue |
|
|
|
} |
|
|
|
jsonData := struct { |
|
|
|
Name string `json:"name"` |
|
|
|
Id string `json:"id"` |
|
|
|
}{} |
|
|
|
jsonData := entity.JsonData{} |
|
|
|
err := json.Unmarshal([]byte(c.JsonData), &jsonData) |
|
|
|
if err != nil { |
|
|
|
return nil, fmt.Errorf("db yaml jsonData convert failed, task %d, cluster %s, datatype: %s", taskId, cluster.ClusterId, "dataset") |
|
|
|
@@ -261,10 +247,7 @@ func updateClustersByScheduledDatas(taskId int64, clustersWithDataDistributes *C |
|
|
|
if c.JsonData == "" { |
|
|
|
continue |
|
|
|
} |
|
|
|
jsonData := struct { |
|
|
|
Name string `json:"name"` |
|
|
|
Id string `json:"id"` |
|
|
|
}{} |
|
|
|
jsonData := entity.JsonData{} |
|
|
|
err := json.Unmarshal([]byte(c.JsonData), &jsonData) |
|
|
|
if err != nil { |
|
|
|
return nil, fmt.Errorf("db yaml jsonData convert failed, task %d, cluster %s, datatype: %s", taskId, cluster.ClusterId, "image") |
|
|
|
@@ -286,10 +269,7 @@ func updateClustersByScheduledDatas(taskId int64, clustersWithDataDistributes *C |
|
|
|
if c.JsonData == "" { |
|
|
|
continue |
|
|
|
} |
|
|
|
jsonData := struct { |
|
|
|
Name string `json:"name"` |
|
|
|
Id string `json:"id"` |
|
|
|
}{} |
|
|
|
jsonData := entity.JsonData{} |
|
|
|
err := json.Unmarshal([]byte(c.JsonData), &jsonData) |
|
|
|
if err != nil { |
|
|
|
return nil, fmt.Errorf("db yaml jsonData convert failed, task %d, cluster %s, datatype: %s", taskId, cluster.ClusterId, "code") |
|
|
|
@@ -308,10 +288,7 @@ func updateClustersByScheduledDatas(taskId int64, clustersWithDataDistributes *C |
|
|
|
if c.JsonData == "" { |
|
|
|
continue |
|
|
|
} |
|
|
|
jsonData := struct { |
|
|
|
Name string `json:"name"` |
|
|
|
Id string `json:"id"` |
|
|
|
}{} |
|
|
|
jsonData := entity.JsonData{} |
|
|
|
err := json.Unmarshal([]byte(c.JsonData), &jsonData) |
|
|
|
if err != nil { |
|
|
|
return nil, fmt.Errorf("jsonData convert failed, task %d, cluster %s, datatype: %s", taskId, cluster.ClusterId, "model") |
|
|
|
|