Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
J
jz-dmp-cmdexectool
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-cmdexectool
Commits
7b6cc6a6
Commit
7b6cc6a6
authored
Feb 26, 2021
by
sml
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
冲突处理
parent
25fad8a5
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
17 deletions
+19
-17
ProcessService.java
...cmdexectool/scheduler/service/process/ProcessService.java
+19
-17
No files found.
src/main/java/com/jz/dmp/cmdexectool/scheduler/service/process/ProcessService.java
View file @
7b6cc6a6
...
@@ -21,6 +21,7 @@ import java.util.HashMap;
...
@@ -21,6 +21,7 @@ import java.util.HashMap;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
import
com.jz.dmp.cmdexectool.scheduler.common.task.sync.SyncParameters
;
import
org.slf4j.Logger
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
@@ -161,15 +162,15 @@ public class ProcessService {
...
@@ -161,15 +162,15 @@ public class ProcessService {
String
taskType
=
dmpDevelopTaskDto
.
getTaskType
();
//任务类型
String
taskType
=
dmpDevelopTaskDto
.
getTaskType
();
//任务类型
if
(
taskType
.
equals
(
CommConstant
.
TASK_TYPE_DEVSHELL
))
{
if
(
taskType
.
equals
(
CommConstant
.
TASK_TYPE_DEVSHELL
))
{
jobType
=
JobType
.
SHELL
;
jobType
=
JobType
.
shell
;
script
=
dmpDevelopTaskDto
.
getScript
();
script
=
dmpDevelopTaskDto
.
getScript
();
taskAppId
=
dmpDevelopTaskDto
.
getName
();
taskAppId
=
dmpDevelopTaskDto
.
getName
();
}
else
if
(
taskType
.
equals
(
CommConstant
.
TASK_TYPE_DEVSQL
))
{
}
else
if
(
taskType
.
equals
(
CommConstant
.
TASK_TYPE_DEVSQL
))
{
jobType
=
JobType
.
SQL
;
jobType
=
JobType
.
sql
;
script
=
dmpDevelopTaskDto
.
getScript
();
script
=
dmpDevelopTaskDto
.
getScript
();
taskAppId
=
dmpDevelopTaskDto
.
getName
();
taskAppId
=
dmpDevelopTaskDto
.
getName
();
}
else
if
(
taskType
.
equals
(
CommConstant
.
TASK_TYPE_OFFLINE
))
{
}
else
if
(
taskType
.
equals
(
CommConstant
.
TASK_TYPE_OFFLINE
))
{
jobType
=
JobType
.
SYNC
;
jobType
=
JobType
.
sync
;
script
=
dmpDevelopTaskDto
.
getScript
();
script
=
dmpDevelopTaskDto
.
getScript
();
taskAppId
=
dmpDevelopTaskDto
.
getName
();
taskAppId
=
dmpDevelopTaskDto
.
getName
();
}
else
if
(
taskType
.
equals
(
CommConstant
.
TASK_TYPE_DEVELOP
))
{
}
else
if
(
taskType
.
equals
(
CommConstant
.
TASK_TYPE_DEVELOP
))
{
...
@@ -189,45 +190,46 @@ public class ProcessService {
...
@@ -189,45 +190,46 @@ public class ProcessService {
}
}
switch
(
jobType
)
{
switch
(
jobType
)
{
case
SHELL
:
case
shell
:
ShellParameters
shellParameters
=
new
ShellParameters
();
ShellParameters
shellParameters
=
new
ShellParameters
();
shellParameters
.
setScript
(
script
);
shellParameters
.
setScript
(
script
);
shellParameters
.
setTaskAppId
(
taskAppId
);
shellParameters
.
setTaskAppId
(
taskAppId
);
taskExecutionContext
=
new
TaskExecutionContext
(
shellParameters
,
projectConfigInfoDto
);
taskExecutionContext
=
new
TaskExecutionContext
(
shellParameters
,
projectConfigInfoDto
);
break
;
break
;
case
SQL
:
case
sql
:
SqlParameters
sqlParameters
=
new
SqlParameters
(
script
,
projectConfigInfoDto
,
dmpSyncingDatasourceDao
,
freeMarkerConfigurer
);
SqlParameters
sqlParameters
=
new
SqlParameters
(
script
,
projectConfigInfoDto
,
dmpSyncingDatasourceDao
,
freeMarkerConfigurer
);
sqlParameters
.
setTaskAppId
(
taskAppId
);
sqlParameters
.
setTaskAppId
(
taskAppId
);
taskExecutionContext
=
new
TaskExecutionContext
(
sqlParameters
,
projectConfigInfoDto
);
taskExecutionContext
=
new
TaskExecutionContext
(
sqlParameters
,
projectConfigInfoDto
);
break
;
break
;
case
SYNC:
case
sync:
SyncParameters
sync
=
new
SyncParameters
(
script
,
projectConfigInfoDto
,
dmpSyncingDatasourceDao
,
freeMarkerConfigurer
);
sync
.
setTaskAppId
(
taskAppId
);
taskExecutionContext
=
new
TaskExecutionContext
(
sync
,
projectConfigInfoDto
);
break
;
break
;
case
SUBPROCESS
:
case
subprocess
:
break
;
break
;
case
FTP:
case
ftp:
FtpParameters
ftpParameters
=
new
FtpParameters
();
FtpParameters
ftpParameters
=
new
FtpParameters
(
script
,
freeMarkerConfigurer
);
ftpParameters
.
setScript
(
script
);
ftpParameters
.
setTaskAppId
(
taskAppId
);
ftpParameters
.
setTaskAppId
(
taskAppId
);
taskExecutionContext
=
new
TaskExecutionContext
(
ftpParameters
,
projectConfigInfoDto
);
taskExecutionContext
=
new
TaskExecutionContext
(
ftpParameters
,
projectConfigInfoDto
);
break
;
break
;
case
UNZIPFILE
:
case
unzipFile
:
UnzipfileParameters
unzipfileParameters
=
new
UnzipfileParameters
();
UnzipfileParameters
unzipfileParameters
=
new
UnzipfileParameters
(
script
,
freeMarkerConfigurer
);
unzipfileParameters
.
setScript
(
script
);
unzipfileParameters
.
setScript
(
script
);
unzipfileParameters
.
setTaskAppId
(
taskAppId
);
unzipfileParameters
.
setTaskAppId
(
taskAppId
);
taskExecutionContext
=
new
TaskExecutionContext
(
unzipfileParameters
,
projectConfigInfoDto
);
taskExecutionContext
=
new
TaskExecutionContext
(
unzipfileParameters
,
projectConfigInfoDto
);
break
;
break
;
case
DOCTRANS
:
case
docTrans
:
DoctransParameters
doctransParameters
=
new
DoctransParameters
();
DoctransParameters
doctransParameters
=
new
DoctransParameters
(
script
,
freeMarkerConfigurer
);
doctransParameters
.
setScript
(
script
);
doctransParameters
.
setScript
(
script
);
doctransParameters
.
setTaskAppId
(
taskAppId
);
doctransParameters
.
setTaskAppId
(
taskAppId
);
taskExecutionContext
=
new
TaskExecutionContext
(
doctransParameters
,
projectConfigInfoDto
);
taskExecutionContext
=
new
TaskExecutionContext
(
doctransParameters
,
projectConfigInfoDto
);
break
;
break
;
case
HDFS
:
case
hdfs
:
HdfsParameters
hdfsParameters
=
new
HdfsParameters
();
HdfsParameters
hdfsParameters
=
new
HdfsParameters
(
script
,
freeMarkerConfigurer
);
hdfsParameters
.
setScript
(
script
);
hdfsParameters
.
setScript
(
script
);
hdfsParameters
.
setTaskAppId
(
taskAppId
);
hdfsParameters
.
setTaskAppId
(
taskAppId
);
taskExecutionContext
=
new
TaskExecutionContext
(
hdfsParameters
,
projectConfigInfoDto
);
taskExecutionContext
=
new
TaskExecutionContext
(
hdfsParameters
,
projectConfigInfoDto
);
...
...
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