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
d4b31294
Commit
d4b31294
authored
Jan 26, 2021
by
mcb
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
no message
parent
bc4fcb94
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
57 additions
and
2 deletions
+57
-2
AzkabanApiUtils2.java
src/main/java/com/jz/common/utils/AzkabanApiUtils2.java
+2
-2
OfflineSynchController.java
...es/controller/DataIntegration/OfflineSynchController.java
+25
-0
OfflineSynchService.java
.../java/com/jz/dmp/modules/service/OfflineSynchService.java
+9
-0
OfflineSynchServiceImpl.java
.../jz/dmp/modules/service/impl/OfflineSynchServiceImpl.java
+21
-0
No files found.
src/main/java/com/jz/common/utils/AzkabanApiUtils2.java
View file @
d4b31294
...
@@ -95,7 +95,7 @@ public class AzkabanApiUtils2 {
...
@@ -95,7 +95,7 @@ public class AzkabanApiUtils2 {
String
sessionId
=
SessionUtils
.
getSession
().
getId
();
//"dcfc608c-c58a-45b7-adc7-9902b652496e";
String
sessionId
=
SessionUtils
.
getSession
().
getId
();
//"dcfc608c-c58a-45b7-adc7-9902b652496e";
//String sessionId = "f70d53fa-55da-4688-8d00-64350e4fb8ea";
//String sessionId = "f70d53fa-55da-4688-8d00-64350e4fb8ea";
System
.
err
.
println
(
"----"
+
sessionId
);
System
.
err
.
println
(
"----
sessionId=
"
+
sessionId
);
return
sessionId
;
//SessionUtils.getSession().getId();
return
sessionId
;
//SessionUtils.getSession().getId();
}
}
...
@@ -502,7 +502,7 @@ public class AzkabanApiUtils2 {
...
@@ -502,7 +502,7 @@ public class AzkabanApiUtils2 {
String
execIdsStr
=
""
;
String
execIdsStr
=
""
;
//将所有的实例停止
//将所有的实例停止
for
(
Integer
execid
:
execIds
)
{
for
(
Integer
execid
:
execIds
)
{
LOGGER
.
info
(
"execid:"
+
execid
);
LOGGER
.
info
(
"
######执行实例
execid:"
+
execid
);
cancleFlow
(
sessionId
,
execid
);
cancleFlow
(
sessionId
,
execid
);
execIdsStr
=
execIdsStr
+
","
+
execid
;
execIdsStr
=
execIdsStr
+
","
+
execid
;
}
}
...
...
src/main/java/com/jz/dmp/modules/controller/DataIntegration/OfflineSynchController.java
View file @
d4b31294
...
@@ -98,6 +98,31 @@ public class OfflineSynchController {
...
@@ -98,6 +98,31 @@ public class OfflineSynchController {
return
list
;
return
list
;
}
}
/**
* 任务停止运行
*
* @return
* @author Bellamy
* @since 2021-01-07
*/
@ApiOperation
(
value
=
"停止运行"
,
notes
=
"停止运行"
)
@GetMapping
(
value
=
"/stopSyncingTask"
)
@ApiImplicitParam
(
name
=
"taskId"
,
value
=
"任务id"
)
public
JsonResult
stopTaskRunNowByTaskId
(
@RequestParam
(
value
=
"taskId"
)
String
taskId
)
throws
Exception
{
if
(
StringUtils
.
isEmpty
(
taskId
))
{
return
new
JsonResult
(
ResultCode
.
PARAMS_ERROR
);
}
JsonResult
list
=
new
JsonResult
();
try
{
list
=
offlineSynchService
.
stopSyncingTaskByTaskId
(
taskId
);
}
catch
(
Exception
e
)
{
list
.
setMessage
(
e
.
getMessage
());
list
.
setCode
(
ResultCode
.
INTERNAL_SERVER_ERROR
);
e
.
printStackTrace
();
}
return
list
;
}
/**
/**
* 根据taskId删除离线任务
* 根据taskId删除离线任务
*
*
...
...
src/main/java/com/jz/dmp/modules/service/OfflineSynchService.java
View file @
d4b31294
...
@@ -102,4 +102,13 @@ public interface OfflineSynchService {
...
@@ -102,4 +102,13 @@ public interface OfflineSynchService {
* @since 2021-01-21
* @since 2021-01-21
*/
*/
JsonResult
querySoureTableColumns
(
SoureTableColumnsReq
req
)
throws
Exception
;
JsonResult
querySoureTableColumns
(
SoureTableColumnsReq
req
)
throws
Exception
;
/**
* 任务停止运行
*
* @return
* @author Bellamy
* @since 2021-01-07
*/
JsonResult
stopSyncingTaskByTaskId
(
String
taskId
)
throws
Exception
;
}
}
src/main/java/com/jz/dmp/modules/service/impl/OfflineSynchServiceImpl.java
View file @
d4b31294
...
@@ -734,4 +734,25 @@ public class OfflineSynchServiceImpl implements OfflineSynchService {
...
@@ -734,4 +734,25 @@ public class OfflineSynchServiceImpl implements OfflineSynchService {
}
}
}
}
/**
* 任务停止运行
*
* @return
* @author Bellamy
* @since 2021-01-07
*/
@Override
public
JsonResult
stopSyncingTaskByTaskId
(
String
taskId
)
throws
Exception
{
//根据任务id,查询DMP资源导航树和DW系统配置信息
Map
<
String
,
Object
>
map
=
offlineSynchDao
.
selectNavigationTreeByTaskId
(
taskId
);
if
(
map
==
null
||
map
.
size
()
==
0
)
{
throw
new
RuntimeException
(
"任务数据信息不存在"
);
}
String
azkabanMonitorUrl
=
map
.
get
(
"azkabanMonitorUrl"
).
toString
();
Long
projectId
=
Long
.
valueOf
(
map
.
get
(
"projectId"
).
toString
());
AzkabanApiUtils2
azkabanApiUtils
=
new
AzkabanApiUtils2
(
azkabanMonitorUrl
);
String
execId
=
azkabanApiUtils
.
stopFlow
(
"jz_localflow_"
+
projectId
,
map
.
get
(
"treeName"
).
toString
());
return
JsonResult
.
ok
();
}
}
}
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