1
0
mirror of https://github.com/newnius/YAO-scheduler.git synced 2025-12-12 23:36:44 +00:00
This commit is contained in:
2020-05-04 13:59:01 +08:00
parent b6516496bc
commit d9a53d52e5
4 changed files with 34 additions and 7 deletions

View File

@@ -115,7 +115,7 @@ func (jm *JobManager) start() {
v.Set("cpu_limit", strconv.Itoa(jm.job.Tasks[i].NumberCPU))
v.Set("network", network)
v.Set("should_wait", "1")
v.Set("output_dir", "/output/")
v.Set("output_dir", "/tmp/")
v.Set("hdfs_dir", "http://hdfs-master:50070/user/yao/output/"+jm.job.Name)
v.Set("gpu_mem", strconv.Itoa(jm.job.Tasks[i].MemoryGPU))
@@ -171,6 +171,14 @@ func (jm *JobManager) start() {
log.Info(jm.job.Name, "-", i, " ", res.Status[i].Status)
/* save logs etc. */
if exitCode, ok := res.Status[i].State["ExitCode"].(int); ok {
if exitCode != 0 {
log.Warn(jm.job.Name+"-"+jm.job.Tasks[i].Name+" exited unexpected, exitCode=", exitCode)
jm.killedFlag = true
jm.scheduler.UpdateProgress(jm.job, Failed)
}
}
/* remove exited containers */
//v := url.Values{}
//v.Set("id", res.Status[i].Id)