package strategy const ( REPLICATION = "replication" RESOURCES_PRICING = "resourcesPricing" STATIC_WEIGHT = "staticWeight" DYNAMIC_RESOURCES = "dynamicResources" RANDOM = "random" DATA_LOCALITY = "dataLocality" //感知数据位置,数据调度和计算调度协同,近数据调度 ENERGY_CONSUMPTION = "energyConsumption" //根据各集群总体能耗水平调度作业,优先选择能耗低的集群调度作业 LEASTLOADFIRST = "leastLoadFirst" ) var ( strategyNames = []string{REPLICATION, RESOURCES_PRICING, STATIC_WEIGHT, DYNAMIC_RESOURCES, RANDOM} ) type Strategy interface { Schedule() ([]*AssignedCluster, error) } type AssignedCluster struct { ClusterId string ClusterName string Replicas int32 Cmd string Envs []string Params []string ResourcesRequired []map[string]interface{} DatasetId string ImageId string CodeId string ModelId string Output string } func GetStrategyNames() []string { return strategyNames }