Commit 5826d660 by huangfusuper

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

parents 73cba8e2 92551bc7
package com.byit.executor.jobExecutor.process; package com.byit.executor.jobExecutor.process;
import com.byit.executor.conf.FileSystemContext;
import com.byit.executor.util.JobContentUtil; import com.byit.executor.util.JobContentUtil;
import com.byit.executor.util.LogGobbler; import com.byit.executor.util.LogGobbler;
import com.google.common.base.Joiner; import com.google.common.base.Joiner;
...@@ -49,7 +50,9 @@ public class MythJobProcess implements Runnable{ ...@@ -49,7 +50,9 @@ public class MythJobProcess implements Runnable{
//本次任务对应的日志id //本次任务对应的日志id
private Integer logId; private Integer logId;
//执行日志内容 //执行日志内容
private String logContent; private String logFilePath;
//上传日志工具类
private FileSystemContext fileSystemContext;
public MythJobProcess(final List<String> cmd, final Map<String, String> env, public MythJobProcess(final List<String> cmd, final Map<String, String> env,
final String workingDir, final Integer logId) { final String workingDir, final Integer logId) {
...@@ -59,6 +62,7 @@ public class MythJobProcess implements Runnable{ ...@@ -59,6 +62,7 @@ public class MythJobProcess implements Runnable{
this.processId = -1; this.processId = -1;
this.startupLatch = new CountDownLatch(1); this.startupLatch = new CountDownLatch(1);
this.completeLatch = new CountDownLatch(1); this.completeLatch = new CountDownLatch(1);
this.logId = logId;
} }
public MythJobProcess(final List<String> cmd, final Map<String, String> env, public MythJobProcess(final List<String> cmd, final Map<String, String> env,
...@@ -141,7 +145,7 @@ public class MythJobProcess implements Runnable{ ...@@ -141,7 +145,7 @@ public class MythJobProcess implements Runnable{
if (this.process.isAlive()){ if (this.process.isAlive()){
this.process.destroy(); this.process.destroy();
} }
logContent = outputGobbler.getRecentLog() + "\n" + errorGobbler.getRecentLog(); logFilePath = outputGobbler.getRecentLog() + "\n" + errorGobbler.getRecentLog();
//TODO 将日志写到fastdfs上 //TODO 将日志写到fastdfs上
} }
} }
...@@ -299,6 +303,6 @@ public class MythJobProcess implements Runnable{ ...@@ -299,6 +303,6 @@ public class MythJobProcess implements Runnable{
} }
public String getLogContent(){ 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