1
0
mirror of https://github.com/newnius/YAO-scheduler.git synced 2025-06-07 14:21:55 +00:00

update fair

This commit is contained in:
Newnius 2020-06-03 09:26:22 +08:00
parent 6341b7a68c
commit 1b54e2c95f
2 changed files with 4 additions and 2 deletions

View File

@ -84,6 +84,8 @@ func (jm *JobManager) start() {
v.Set("hdfs_address", "http://192.168.100.104:50070/") v.Set("hdfs_address", "http://192.168.100.104:50070/")
v.Set("hdfs_dir", "/user/yao/output/"+jm.job.Name) v.Set("hdfs_dir", "/user/yao/output/"+jm.job.Name)
v.Set("gpu_mem", strconv.Itoa(jm.job.Tasks[index].MemoryGPU)) v.Set("gpu_mem", strconv.Itoa(jm.job.Tasks[index].MemoryGPU))
v.Set("dfs_src", "/dfs/"+jm.job.Name+"/task-"+strconv.Itoa(index))
v.Set("dfs_dst", "/tmp")
resp, err := doRequest("POST", "http://"+jm.resources[index].ClientHost+":8000/create", strings.NewReader(v.Encode()), "application/x-www-form-urlencoded", "") resp, err := doRequest("POST", "http://"+jm.resources[index].ClientHost+":8000/create", strings.NewReader(v.Encode()), "application/x-www-form-urlencoded", "")
if err != nil { if err != nil {

View File

@ -42,8 +42,8 @@ func (scheduler *SchedulerFair) Start() {
scheduler.history = []*Job{} scheduler.history = []*Job{}
scheduler.queues = map[string][]Job{} scheduler.queues = map[string][]Job{}
scheduler.queues["default"] = []Job{} scheduler.queues["default"] = []Job{}
scheduler.drfyarn = true scheduler.drfyarn = false
scheduler.enableBorrow = false scheduler.enableBorrow = true
scheduler.IOUs = map[string]map[string]*ResourceCount{} scheduler.IOUs = map[string]map[string]*ResourceCount{}
scheduler.queuesQuota = map[string]*ResourceCount{} scheduler.queuesQuota = map[string]*ResourceCount{}
scheduler.resourceAllocations = map[string]*ResourceCount{} scheduler.resourceAllocations = map[string]*ResourceCount{}