Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
J
jz-dmp-service
Project
Project
Details
Activity
Releases
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
姚本章
jz-dmp-service
Commits
d8b06dd8
Commit
d8b06dd8
authored
Feb 04, 2021
by
mcb
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
commit
parent
2c761923
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
123 additions
and
47 deletions
+123
-47
ExecutionFlowsMapper.java
...ain/java/com/jz/dmp/azkaban/dao/ExecutionFlowsMapper.java
+9
-0
DmpDevExamplesController.java
...es/controller/dataOperation/DmpDevExamplesController.java
+24
-0
DmpDevelopTaskService.java
...ava/com/jz/dmp/modules/service/DmpDevelopTaskService.java
+58
-47
DmpDevelopTaskServiceImpl.java
...z/dmp/modules/service/impl/DmpDevelopTaskServiceImpl.java
+21
-0
ExecutionFlowsMapper.xml
src/main/resources/azkabanmapper/ExecutionFlowsMapper.xml
+11
-0
No files found.
src/main/java/com/jz/dmp/azkaban/dao/ExecutionFlowsMapper.java
View file @
d8b06dd8
...
...
@@ -28,4 +28,13 @@ public interface ExecutionFlowsMapper {
* @since 2021-01-14
*/
List
<
DataDevExamplesListDto
>
queryDevExamplesListPage
(
Map
saveParams
)
throws
Exception
;
/**
* 获取执行实例的日志详情
*
* @return
* @author Bellamy
* @since 2021-02-03
*/
List
<
Map
>
queryExamplesLogByExecId
(
String
execId
)
throws
Exception
;
}
src/main/java/com/jz/dmp/modules/controller/dataOperation/DmpDevExamplesController.java
View file @
d8b06dd8
...
...
@@ -58,5 +58,29 @@ public class DmpDevExamplesController {
return
pageInfo
;
}
/**
* 获取执行实例的日志详情
*
* @return
* @author Bellamy
* @since 2021-02-03
*/
@ApiOperation
(
value
=
"执行实例日志详情"
,
notes
=
"执行实例日志详情"
)
@GetMapping
(
value
=
"/log"
)
@ApiImplicitParam
(
name
=
"execId"
,
value
=
"执行实例ID"
,
required
=
true
)
public
JsonResult
getExamplesLog
(
@RequestParam
String
execId
)
{
if
(
StringUtils
.
isEmpty
(
execId
))
{
return
JsonResult
.
error
(
ResultCode
.
PARAMS_ERROR
,
"执行实例ID不能为空!"
);
}
JsonResult
result
=
new
JsonResult
();
try
{
result
=
dmpDevelopTaskService
.
queryExamplesLogByExecId
(
execId
);
}
catch
(
Exception
e
)
{
result
.
setCode
(
ResultCode
.
INTERNAL_SERVER_ERROR
);
result
.
setMessage
(
"查询失败!"
);
e
.
printStackTrace
();
}
return
result
;
}
}
src/main/java/com/jz/dmp/modules/service/DmpDevelopTaskService.java
View file @
d8b06dd8
...
...
@@ -52,55 +52,66 @@ public interface DmpDevelopTaskService {
*/
PageInfoResponse
<
DataDevExamplesListDto
>
queryDevExamplesListPage
(
DataDevExamplesListReq
req
)
throws
Exception
;
/**条件分頁查询所有任务开发
* @param dmpDevelopTaskRequest
* @param httpRequest
* @return
* @throws Exception
*/
public
com
.
jz
.
common
.
bean
.
PageInfoResponse
<
DmpDevelopTaskDto
>
findListWithPage
(
DmpDevelopTaskRequest
dmpDevelopTaskRequest
,
HttpServletRequest
httpRequest
)
throws
Exception
;
/**
* @Title: getConfigFileNameNotSuffix4Published
* @Description: TODO(根据treeId取得最新版提交的同步脚本文件名(不含后缀)及版本信息)
* @param @param treeId
* @param @return
* @param @throws Exception 参数
* @return String 返回类型
* @throws
*/
public
String
getConfigFileNameNotSuffix4Published
(
Long
treeId
)
throws
Exception
;
/**新增开发任务
* @param dmpDevelopTask
* @param httpRequest
* @return
* @throws Exception
*/
public
BaseBeanResponse
<
DmpDevelopTask
>
add
(
DmpDevelopTask
dmpDevelopTask
,
HttpServletRequest
httpRequest
)
throws
Exception
;
/**
* 条件分頁查询所有任务开发
*
* @param dmpDevelopTaskRequest
* @param httpRequest
* @return
* @throws Exception
*/
public
com
.
jz
.
common
.
bean
.
PageInfoResponse
<
DmpDevelopTaskDto
>
findListWithPage
(
DmpDevelopTaskRequest
dmpDevelopTaskRequest
,
HttpServletRequest
httpRequest
)
throws
Exception
;
/**
* @param @param treeId
* @param @return
* @param @throws Exception 参数
* @return String 返回类型
* @throws
* @Title: getConfigFileNameNotSuffix4Published
* @Description: TODO(根据treeId取得最新版提交的同步脚本文件名 ( 不含后缀 ) 及版本信息)
*/
public
String
getConfigFileNameNotSuffix4Published
(
Long
treeId
)
throws
Exception
;
/**
* @Title: flowSubmit
* @Description: TODO(工作任务流保存提交)
* @param @param flowPro
* @param @param httpRequest
* @param @return
* @param @throws Exception 参数
* @return BaseResponse 返回类型
* @throws
*/
public
BaseResponse
flowSubmit
(
DmpDevelopTask
dmpDevelopTask
,
HttpServletRequest
httpRequest
)
throws
Exception
;
/**
* 新增开发任务
*
* @param dmpDevelopTask
* @param httpRequest
* @return
* @throws Exception
*/
public
BaseBeanResponse
<
DmpDevelopTask
>
add
(
DmpDevelopTask
dmpDevelopTask
,
HttpServletRequest
httpRequest
)
throws
Exception
;
/**
* @Title: getExecXmlFileName
* @Description: TODO(根据任务treeId获取xmlFileName)
* @param @param syncTaskTreeId
* @param @return
* @param @throws Exception 参数
* @return String 返回类型
* @throws
*/
public
String
getExecXmlFileName
(
Long
syncTaskTreeId
)
throws
Exception
;
/**
* @param @param flowPro
* @param @param httpRequest
* @param @return
* @param @throws Exception 参数
* @return BaseResponse 返回类型
* @throws
* @Title: flowSubmit
* @Description: TODO(工作任务流保存提交)
*/
public
BaseResponse
flowSubmit
(
DmpDevelopTask
dmpDevelopTask
,
HttpServletRequest
httpRequest
)
throws
Exception
;
/**
* @param @param syncTaskTreeId
* @param @return
* @param @throws Exception 参数
* @return String 返回类型
* @throws
* @Title: getExecXmlFileName
* @Description: TODO(根据任务treeId获取xmlFileName)
*/
public
String
getExecXmlFileName
(
Long
syncTaskTreeId
)
throws
Exception
;
/**
* 获取执行实例的日志详情
*
* @return
* @author Bellamy
* @since 2021-02-03
*/
JsonResult
queryExamplesLogByExecId
(
String
execId
)
throws
Exception
;
}
\ No newline at end of file
src/main/java/com/jz/dmp/modules/service/impl/DmpDevelopTaskServiceImpl.java
View file @
d8b06dd8
...
...
@@ -12,6 +12,9 @@ import java.util.regex.Pattern;
import
javax.servlet.http.HttpServletRequest
;
import
com.alibaba.fastjson.JSONObject
;
import
com.mysql.jdbc.Blob
;
import
org.apache.tomcat.jni.Mmap
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.aop.ThrowsAdvice
;
...
...
@@ -1232,4 +1235,22 @@ public class DmpDevelopTaskServiceImpl extends BaseService implements DmpDevelop
return
xmlFileName
;
}
/**
* 获取执行实例的日志详情
*
* @return
* @author Bellamy
* @since 2021-02-03
*/
@Override
public
JsonResult
queryExamplesLogByExecId
(
String
execId
)
throws
Exception
{
List
<
Map
>
list
=
executionFlowsMapper
.
queryExamplesLogByExecId
(
execId
);
if
(
list
.
size
()
>
0
&&
list
!=
null
)
{
list
.
forEach
(
map
->
{
map
.
put
(
"log"
,
map
.
get
(
"log"
));
});
}
return
JsonResult
.
ok
(
list
);
}
}
\ No newline at end of file
src/main/resources/azkabanmapper/ExecutionFlowsMapper.xml
View file @
d8b06dd8
...
...
@@ -192,4 +192,15 @@
<if
test=
"endTime != null and endTime != ''"
>
#{endTime} >= and from_unixtime(submit_time/1000,'%Y-%m-%d %H:%i:%s')
</if>
</select>
<!--获取执行实例的日志详情-->
<select
id=
"queryExamplesLogByExecId"
parameterType=
"string"
resultType=
"java.util.Map"
>
select
exec_id as execId,
name,
log,
from_unixtime(upload_time/1000, '%Y-%m-%d %H:%i:%s') as uploadTime
from execution_logs
where 1=1 and exec_id=#{execId}
</select>
</mapper>
\ No newline at end of file
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