You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

hpcScheduler.go 806 B

12345678910111213141516171819202122232425262728293031
  1. package scheduler
  2. import (
  3. "gitlink.org.cn/jcce-pcm/pcm-coordinator/api/internal/algo"
  4. "gitlink.org.cn/jcce-pcm/pcm-coordinator/api/internal/types"
  5. "gitlink.org.cn/jcce-pcm/pcm-coordinator/model"
  6. "gitlink.org.cn/jcce-pcm/utils/tool"
  7. )
  8. type hpcScheduler struct {
  9. yamlString string
  10. }
  11. func NewHpcScheduler(val string) *hpcScheduler {
  12. return &hpcScheduler{yamlString: val}
  13. }
  14. func (h *hpcScheduler) getNewStructForDb(task *types.TaskInfo, participantIds []int64) (interface{}, error) {
  15. hpc := model.Hpc{
  16. TaskId: task.TaskId,
  17. Status: "Saved",
  18. //ParticipantId: participantId[0],
  19. YamlString: h.yamlString,
  20. }
  21. tool.Convert(task.Metadata, &hpc)
  22. return hpc, nil
  23. }
  24. func (cs *hpcScheduler) pickOptimalStrategy(task *algo.Task, providers ...*algo.Provider) (*algo.Task, error) {
  25. return nil, nil
  26. }

PCM is positioned as Software stack over Cloud, aiming to build the standards and ecology of heterogeneous cloud collaboration for JCC in a non intrusive and autonomous peer-to-peer manner.