Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
B
byit-myth-job
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
liyuan
byit-myth-job
Commits
5826d660
Commit
5826d660
authored
Feb 21, 2020
by
huangfusuper
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/developer' into developer
parents
73cba8e2
92551bc7
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
3 deletions
+7
-3
MythJobProcess.java
...com/byit/executor/jobExecutor/process/MythJobProcess.java
+7
-3
No files found.
byit-myth-core/myth-executor-core/src/main/java/com/byit/executor/jobExecutor/process/MythJobProcess.java
View file @
5826d660
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
();
}
log
Content
=
outputGobbler
.
getRecentLog
()
+
"\n"
+
errorGobbler
.
getRecentLog
();
log
FilePath
=
outputGobbler
.
getRecentLog
()
+
"\n"
+
errorGobbler
.
getRecentLog
();
//TODO 将日志写到fastdfs上
}
}
...
...
@@ -299,6 +303,6 @@ public class MythJobProcess implements Runnable{
}
public
String
getLogContent
(){
return
log
Content
;
return
log
FilePath
;
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment