Commit 5826d660 by huangfusuper

Merge remote-tracking branch 'origin/developer' into developer

parents 73cba8e2 92551bc7
package com.byit.executor.jobExecutor.process;
import com.byit.executor.conf.FileSystemContext;
import com.byit.executor.util.JobContentUtil;
import com.byit.executor.util.LogGobbler;
import com.google.common.base.Joiner;
......@@ -49,7 +50,9 @@ public class MythJobProcess implements Runnable{
//本次任务对应的日志id
private Integer logId;
//执行日志内容
private String logContent;
private String logFilePath;
//上传日志工具类
private FileSystemContext fileSystemContext;
public MythJobProcess(final List<String> cmd, final Map<String, String> env,
final String workingDir, final Integer logId) {
......@@ -59,6 +62,7 @@ public class MythJobProcess implements Runnable{
this.processId = -1;
this.startupLatch = new CountDownLatch(1);
this.completeLatch = new CountDownLatch(1);
this.logId = logId;
}
public MythJobProcess(final List<String> cmd, final Map<String, String> env,
......@@ -141,7 +145,7 @@ public class MythJobProcess implements Runnable{
if (this.process.isAlive()){
this.process.destroy();
}
logContent = outputGobbler.getRecentLog() + "\n" + errorGobbler.getRecentLog();
logFilePath = outputGobbler.getRecentLog() + "\n" + errorGobbler.getRecentLog();
//TODO 将日志写到fastdfs上
}
}
......@@ -299,6 +303,6 @@ public class MythJobProcess implements Runnable{
}
public String getLogContent(){
return logContent;
return logFilePath;
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment