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
e2d2f8f3
Commit
e2d2f8f3
authored
Mar 14, 2021
by
mcb
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dmp_dev' of
http://gitlab.ioubuy.cn/yaobenzhang/jz-dmp-service
into dmp_dev
parents
6c65bade
a945c80a
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
25 additions
and
9 deletions
+25
-9
FlowParseTool.java
src/main/java/com/jz/common/utils/FlowParseTool.java
+1
-1
DmpDevelopTaskDto.java
...com/jz/dmp/modules/controller/bean/DmpDevelopTaskDto.java
+2
-1
DmpDevelopTask.java
src/main/java/com/jz/dmp/modules/model/DmpDevelopTask.java
+14
-1
DmpDevelopTaskServiceImpl.java
...z/dmp/modules/service/impl/DmpDevelopTaskServiceImpl.java
+5
-5
DmpDevelopTaskMapper.xml
src/main/resources/mapper/dmp/DmpDevelopTaskMapper.xml
+3
-1
No files found.
src/main/java/com/jz/common/utils/FlowParseTool.java
View file @
e2d2f8f3
...
@@ -518,7 +518,7 @@ public class FlowParseTool {
...
@@ -518,7 +518,7 @@ public class FlowParseTool {
* @throws
* @throws
*/
*/
public
static
String
generateExecutorToolCommand
(
Integer
taskId
,
String
jobId
,
boolean
isSingle
)
{
public
static
String
generateExecutorToolCommand
(
Integer
taskId
,
String
jobId
,
boolean
isSingle
)
{
String
command
=
"command= java -jar /app/bigdata-app/dmp_cmdexecutortool/jz-dmp-cmdexectool.jar "
+
taskId
+
" "
+
jobId
+
" "
+
isSingle
;
String
command
=
"command= java -jar /app/bigdata-app/dmp_cmdexecutortool/jz-dmp-cmdexectool.jar "
+
taskId
+
" "
+
jobId
+
" "
+
isSingle
+
" ${azkaban.flow.execid}"
;
return
command
;
return
command
;
}
}
...
...
src/main/java/com/jz/dmp/modules/controller/bean/DmpDevelopTaskDto.java
View file @
e2d2f8f3
...
@@ -2,6 +2,7 @@ package com.jz.dmp.modules.controller.bean;
...
@@ -2,6 +2,7 @@ package com.jz.dmp.modules.controller.bean;
import
com.jz.dmp.modules.model.DmpDevelopTask
;
import
com.jz.dmp.modules.model.DmpDevelopTask
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
/**任务开发Dto
/**任务开发Dto
* @author ybz
* @author ybz
...
...
src/main/java/com/jz/dmp/modules/model/DmpDevelopTask.java
View file @
e2d2f8f3
...
@@ -181,6 +181,11 @@ public class DmpDevelopTask implements Serializable {
...
@@ -181,6 +181,11 @@ public class DmpDevelopTask implements Serializable {
@ApiModelProperty
(
value
=
"任务名称"
)
@ApiModelProperty
(
value
=
"任务名称"
)
private
String
name
;
private
String
name
;
/**
* createUserName
*/
@ApiModelProperty
(
value
=
"createUserName"
)
private
String
createUserName
;
public
Integer
getId
()
{
public
Integer
getId
()
{
return
id
;
return
id
;
...
@@ -438,6 +443,14 @@ public class DmpDevelopTask implements Serializable {
...
@@ -438,6 +443,14 @@ public class DmpDevelopTask implements Serializable {
this
.
name
=
name
;
this
.
name
=
name
;
}
}
public
String
getCreateUserName
()
{
return
createUserName
;
}
public
void
setCreateUserName
(
String
createUserName
)
{
this
.
createUserName
=
createUserName
;
}
/**
/**
* @Title: getAzkabanName
* @Title: getAzkabanName
* @Description: TODO(拼接azkaban用名称)
* @Description: TODO(拼接azkaban用名称)
...
...
src/main/java/com/jz/dmp/modules/service/impl/DmpDevelopTaskServiceImpl.java
View file @
e2d2f8f3
...
@@ -1479,7 +1479,7 @@ public class DmpDevelopTaskServiceImpl extends BaseService implements DmpDevelop
...
@@ -1479,7 +1479,7 @@ public class DmpDevelopTaskServiceImpl extends BaseService implements DmpDevelop
private
Integer
publishAndExecute
(
DmpDevelopTask
dmpDevelopTask
)
throws
Exception
{
private
Integer
publishAndExecute
(
DmpDevelopTask
dmpDevelopTask
)
throws
Exception
{
Integer
taskId
=
dmpDevelopTask
.
getId
();
//任务id
Integer
taskId
=
dmpDevelopTask
.
getId
();
//任务id
Integer
projectId
=
dmpDevelopTask
.
getProjectId
();
//项目id
Integer
projectId
=
dmpDevelopTask
.
getProjectId
();
//项目id
String
treeName
=
dmpDevelopTask
.
get
Name
();
//任务流程名称
String
azkabanName
=
dmpDevelopTask
.
getAzkaban
Name
();
//任务流程名称
//获取项目配置信息
//获取项目配置信息
Map
<
String
,
Object
>
param
=
new
HashMap
<
String
,
Object
>();
Map
<
String
,
Object
>
param
=
new
HashMap
<
String
,
Object
>();
...
@@ -1509,7 +1509,7 @@ public class DmpDevelopTaskServiceImpl extends BaseService implements DmpDevelop
...
@@ -1509,7 +1509,7 @@ public class DmpDevelopTaskServiceImpl extends BaseService implements DmpDevelop
String
azkabanLocalTaskFilePath
=
dmpProjectConfigInfoDto
.
getDmpPublicConfigInfoDto
().
getAzkabanLocalTaskFilePath
();
//文件路径
String
azkabanLocalTaskFilePath
=
dmpProjectConfigInfoDto
.
getDmpPublicConfigInfoDto
().
getAzkabanLocalTaskFilePath
();
//文件路径
String
azkabanMonitorUrl
=
dmpProjectConfigInfoDto
.
getDmpPublicConfigInfoDto
().
getAzkabanMonitorUrl
();
//AZKABAN WEB服务地址
String
azkabanMonitorUrl
=
dmpProjectConfigInfoDto
.
getDmpPublicConfigInfoDto
().
getAzkabanMonitorUrl
();
//AZKABAN WEB服务地址
String
azkabanJobCommand
=
FlowParseTool
.
generateExecutorToolCommand
(
taskId
,
tree
Name
,
true
);
String
azkabanJobCommand
=
FlowParseTool
.
generateExecutorToolCommand
(
taskId
,
azkaban
Name
,
true
);
/**
/**
* 当前任务生成文件存放根路径
* 当前任务生成文件存放根路径
...
@@ -1549,10 +1549,10 @@ public class DmpDevelopTaskServiceImpl extends BaseService implements DmpDevelop
...
@@ -1549,10 +1549,10 @@ public class DmpDevelopTaskServiceImpl extends BaseService implements DmpDevelop
contents
.
add
(
azkabanJobCommand
);
contents
.
add
(
azkabanJobCommand
);
// 生成job文件
// 生成job文件
String
jobFileAbsolutePath
=
localTaskSourcePath
+
tree
Name
+
".job"
;
String
jobFileAbsolutePath
=
localTaskSourcePath
+
azkaban
Name
+
".job"
;
FileUtils
.
write
(
jobFileAbsolutePath
,
contents
);
FileUtils
.
write
(
jobFileAbsolutePath
,
contents
);
String
localZipTargetFileName
=
tree
Name
+
".zip"
;
String
localZipTargetFileName
=
azkaban
Name
+
".zip"
;
ZipUtils
.
zip
(
localTaskSourcePath
,
localTaskZipPath
,
localZipTargetFileName
);
ZipUtils
.
zip
(
localTaskSourcePath
,
localTaskZipPath
,
localZipTargetFileName
);
//上传到azkaban todo
//上传到azkaban todo
...
@@ -1560,7 +1560,7 @@ public class DmpDevelopTaskServiceImpl extends BaseService implements DmpDevelop
...
@@ -1560,7 +1560,7 @@ public class DmpDevelopTaskServiceImpl extends BaseService implements DmpDevelop
String
localTaskZipAbsolutePath
=
localTaskZipPath
+
"/"
+
localZipTargetFileName
;
String
localTaskZipAbsolutePath
=
localTaskZipPath
+
"/"
+
localZipTargetFileName
;
AzkabanApiUtils2
azkabanApiUtils
=
new
AzkabanApiUtils2
(
azkabanMonitorUrl
,
redisTemplate
);
AzkabanApiUtils2
azkabanApiUtils
=
new
AzkabanApiUtils2
(
azkabanMonitorUrl
,
redisTemplate
);
//return azkabanApiUtils.loginCreateProjectuploadZipAndExecute("jz_localflow_" + taskAlias + "_" + projectId, "local_" + taskAlias + "_project", localTaskZipAbsolutePath, treeName);
//return azkabanApiUtils.loginCreateProjectuploadZipAndExecute("jz_localflow_" + taskAlias + "_" + projectId, "local_" + taskAlias + "_project", localTaskZipAbsolutePath, treeName);
return
azkabanApiUtils
.
loginCreateProjectuploadZipAndExecute
(
"jz_workflow_new_"
+
projectId
,
"local_"
+
taskAlias
+
"_project"
,
localTaskZipAbsolutePath
,
tree
Name
);
return
azkabanApiUtils
.
loginCreateProjectuploadZipAndExecute
(
"jz_workflow_new_"
+
projectId
,
"local_"
+
taskAlias
+
"_project"
,
localTaskZipAbsolutePath
,
azkaban
Name
);
}
}
/**
/**
...
...
src/main/resources/mapper/dmp/DmpDevelopTaskMapper.xml
View file @
e2d2f8f3
...
@@ -25,6 +25,7 @@
...
@@ -25,6 +25,7 @@
<result
column=
"is_gziped"
property=
"isGziped"
jdbcType=
"INTEGER"
/>
<result
column=
"is_gziped"
property=
"isGziped"
jdbcType=
"INTEGER"
/>
<result
column=
"name"
property=
"name"
jdbcType=
"VARCHAR"
/>
<result
column=
"name"
property=
"name"
jdbcType=
"VARCHAR"
/>
<result
column=
"project_id"
property=
"projectId"
jdbcType=
"VARCHAR"
/>
<result
column=
"project_id"
property=
"projectId"
jdbcType=
"VARCHAR"
/>
<result
column=
"create_user_name"
property=
"createUserName"
jdbcType=
"VARCHAR"
/>
<!-- <result column="chk_result" property="chkResult" javaType="VARCHAR"/> -->
<!-- <result column="chk_result" property="chkResult" javaType="VARCHAR"/> -->
<!-- <result column="sync_result" property="syncResult" javaType="VARCHAR"/> -->
<!-- <result column="sync_result" property="syncResult" javaType="VARCHAR"/> -->
</resultMap>
</resultMap>
...
@@ -204,7 +205,8 @@
...
@@ -204,7 +205,8 @@
SELECT
SELECT
task.id,task.task_type,task.type,task.schedule_type,task.is_submit,task.task_desc,task.script,task.data_status,task.create_user_id,task.create_time,
task.id,task.task_type,task.type,task.schedule_type,task.is_submit,task.task_desc,task.script,task.data_status,task.create_user_id,task.create_time,
task.update_user_id,task.update_time,task.tree_id,task.flow_header,
task.update_user_id,task.update_time,task.tree_id,task.flow_header,
task.flow_json, task.version, task.publish_version, task.is_gziped, tree.name
task.flow_json, task.version, task.publish_version, task.is_gziped, tree.name,
user.user_name AS create_user_name
FROM dmp_develop_task task left join dmp_navigation_tree tree ON task.tree_id=tree.id
FROM dmp_develop_task task left join dmp_navigation_tree tree ON task.tree_id=tree.id
LEFT JOIN dmp_member user ON task.CREATE_USER_ID=user.user_id
LEFT JOIN dmp_member user ON task.CREATE_USER_ID=user.user_id
WHERE 1=1 AND tree.data_status = '1'
WHERE 1=1 AND tree.data_status = '1'
...
...
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