Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
dinky
Project
Project
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
wangpeng
dinky
Commits
03de2a8a
Unverified
Commit
03de2a8a
authored
Jun 14, 2022
by
aiwenmo
Committed by
GitHub
Jun 14, 2022
Browse files
Options
Browse Files
Download
Plain Diff
[Fix-603] [admin] Task information will be cleared when refreshing tasks that have lost connection
[Fix-603] [admin] Task information will be cleared when refreshing ta…
parents
858fbd45
a8367874
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
1 deletion
+10
-1
JobHistoryServiceImpl.java
...in/java/com/dlink/service/impl/JobHistoryServiceImpl.java
+5
-0
TaskServiceImpl.java
...src/main/java/com/dlink/service/impl/TaskServiceImpl.java
+5
-1
No files found.
dlink-admin/src/main/java/com/dlink/service/impl/JobHistoryServiceImpl.java
View file @
03de2a8a
package
com
.
dlink
.
service
.
impl
;
package
com
.
dlink
.
service
.
impl
;
import
com.dlink.constant.FlinkRestResultConstant
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
com.dlink.api.FlinkAPI
;
import
com.dlink.api.FlinkAPI
;
...
@@ -70,6 +71,9 @@ public class JobHistoryServiceImpl extends SuperServiceImpl<JobHistoryMapper, Jo
...
@@ -70,6 +71,9 @@ public class JobHistoryServiceImpl extends SuperServiceImpl<JobHistoryMapper, Jo
jobHistory
.
setId
(
id
);
jobHistory
.
setId
(
id
);
try
{
try
{
JsonNode
jobInfo
=
FlinkAPI
.
build
(
jobManagerHost
).
getJobInfo
(
jobId
);
JsonNode
jobInfo
=
FlinkAPI
.
build
(
jobManagerHost
).
getJobInfo
(
jobId
);
if
(
jobInfo
.
has
(
FlinkRestResultConstant
.
ERRORS
)){
return
jobHistory
;
}
JsonNode
exception
=
FlinkAPI
.
build
(
jobManagerHost
).
getException
(
jobId
);
JsonNode
exception
=
FlinkAPI
.
build
(
jobManagerHost
).
getException
(
jobId
);
JsonNode
checkPoints
=
FlinkAPI
.
build
(
jobManagerHost
).
getCheckPoints
(
jobId
);
JsonNode
checkPoints
=
FlinkAPI
.
build
(
jobManagerHost
).
getCheckPoints
(
jobId
);
JsonNode
checkPointsConfig
=
FlinkAPI
.
build
(
jobManagerHost
).
getCheckPointsConfig
(
jobId
);
JsonNode
checkPointsConfig
=
FlinkAPI
.
build
(
jobManagerHost
).
getCheckPointsConfig
(
jobId
);
...
@@ -87,6 +91,7 @@ public class JobHistoryServiceImpl extends SuperServiceImpl<JobHistoryMapper, Jo
...
@@ -87,6 +91,7 @@ public class JobHistoryServiceImpl extends SuperServiceImpl<JobHistoryMapper, Jo
}
}
}
}
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
finally
{
}
finally
{
return
jobHistory
;
return
jobHistory
;
}
}
...
...
dlink-admin/src/main/java/com/dlink/service/impl/TaskServiceImpl.java
View file @
03de2a8a
...
@@ -604,6 +604,7 @@ public class TaskServiceImpl extends SuperServiceImpl<TaskMapper, Task> implemen
...
@@ -604,6 +604,7 @@ public class TaskServiceImpl extends SuperServiceImpl<TaskMapper, Task> implemen
jobInfoDetail
.
setClusterConfiguration
(
clusterConfigurationService
.
getClusterConfigById
(
history
.
getClusterConfigurationId
()));
jobInfoDetail
.
setClusterConfiguration
(
clusterConfigurationService
.
getClusterConfigById
(
history
.
getClusterConfigurationId
()));
}
}
jobInfoDetail
.
setHistory
(
history
);
jobInfoDetail
.
setHistory
(
history
);
jobInfoDetail
.
setJobHistory
(
jobHistoryService
.
getJobHistory
(
id
));
pool
.
push
(
key
,
jobInfoDetail
);
pool
.
push
(
key
,
jobInfoDetail
);
}
}
if
(!
isCoercive
&&
!
inRefreshPlan
(
jobInfoDetail
.
getInstance
()))
{
if
(!
isCoercive
&&
!
inRefreshPlan
(
jobInfoDetail
.
getInstance
()))
{
...
@@ -611,10 +612,13 @@ public class TaskServiceImpl extends SuperServiceImpl<TaskMapper, Task> implemen
...
@@ -611,10 +612,13 @@ public class TaskServiceImpl extends SuperServiceImpl<TaskMapper, Task> implemen
}
}
JobHistory
jobHistoryJson
=
jobHistoryService
.
refreshJobHistory
(
id
,
jobInfoDetail
.
getCluster
().
getJobManagerHost
(),
jobInfoDetail
.
getInstance
().
getJid
(),
jobInfoDetail
.
isNeedSave
());
JobHistory
jobHistoryJson
=
jobHistoryService
.
refreshJobHistory
(
id
,
jobInfoDetail
.
getCluster
().
getJobManagerHost
(),
jobInfoDetail
.
getInstance
().
getJid
(),
jobInfoDetail
.
isNeedSave
());
JobHistory
jobHistory
=
jobHistoryService
.
getJobHistoryInfo
(
jobHistoryJson
);
JobHistory
jobHistory
=
jobHistoryService
.
getJobHistoryInfo
(
jobHistoryJson
);
if
(
JobStatus
.
isDone
(
jobInfoDetail
.
getInstance
().
getStatus
())
&&
Asserts
.
isNull
(
jobHistory
.
getJob
()))
{
return
jobInfoDetail
.
getInstance
();
}
jobInfoDetail
.
setJobHistory
(
jobHistory
);
jobInfoDetail
.
setJobHistory
(
jobHistory
);
String
status
=
jobInfoDetail
.
getInstance
().
getStatus
();
String
status
=
jobInfoDetail
.
getInstance
().
getStatus
();
boolean
jobStatusChanged
=
false
;
boolean
jobStatusChanged
=
false
;
if
(
Asserts
.
isNull
(
jobInfoDetail
.
getJobHistory
().
getJob
())
||
jobInfoDetail
.
getJobHistory
().
getJob
().
has
(
FlinkRestResultConstant
.
ERRORS
))
{
if
(
Asserts
.
isNull
(
jobInfoDetail
.
getJobHistory
().
getJob
())
||
Asserts
.
isNull
(
jobInfoDetail
.
getJobHistory
().
getJob
()
))
{
jobInfoDetail
.
getInstance
().
setStatus
(
JobStatus
.
UNKNOWN
.
getValue
());
jobInfoDetail
.
getInstance
().
setStatus
(
JobStatus
.
UNKNOWN
.
getValue
());
}
else
{
}
else
{
jobInfoDetail
.
getInstance
().
setDuration
(
jobInfoDetail
.
getJobHistory
().
getJob
().
get
(
FlinkRestResultConstant
.
JOB_DURATION
).
asLong
()
/
1000
);
jobInfoDetail
.
getInstance
().
setDuration
(
jobInfoDetail
.
getJobHistory
().
getJob
().
get
(
FlinkRestResultConstant
.
JOB_DURATION
).
asLong
()
/
1000
);
...
...
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