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
9b4bd242
Unverified
Commit
9b4bd242
authored
Dec 17, 2023
by
aiwenmo
Committed by
GitHub
Dec 17, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Fix-2672] [core] Fix the issue of cluster configuration deploy session cluster (#2673)
Co-authored-by:
wenmo
<
32723967+wenmo@users.noreply.github.com
>
parent
98891a54
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
28 additions
and
13 deletions
+28
-13
ClearJobHistoryHandler.java
...in/java/org/dinky/job/handler/ClearJobHistoryHandler.java
+16
-12
ClusterInstanceServiceImpl.java
...va/org/dinky/service/impl/ClusterInstanceServiceImpl.java
+1
-0
JobManager.java
dinky-core/src/main/java/org/dinky/job/JobManager.java
+1
-0
GatewayType.java
...ay/src/main/java/org/dinky/gateway/enums/GatewayType.java
+8
-1
pages.ts
dinky-web/src/locales/en-US/pages.ts
+1
-0
pages.ts
dinky-web/src/locales/zh-CN/pages.ts
+1
-0
No files found.
dinky-admin/src/main/java/org/dinky/job/handler/ClearJobHistoryHandler.java
View file @
9b4bd242
...
...
@@ -19,6 +19,7 @@
package
org
.
dinky
.
job
.
handler
;
import
org.dinky.assertion.Asserts
;
import
org.dinky.data.model.ClusterInstance
;
import
org.dinky.data.model.job.History
;
import
org.dinky.data.model.job.JobInstance
;
...
...
@@ -81,22 +82,25 @@ public class ClearJobHistoryHandler {
// Retrieve the list of job instances to be deleted
List
<
JobInstance
>
deleteList
=
jobInstanceService
.
list
(
deleteWrapper
);
List
<
Integer
>
historyDeleteIds
=
deleteList
.
stream
().
map
(
JobInstance:
:
getHistoryId
).
collect
(
Collectors
.
toList
());
// Delete the cluster from the instance to be deleted, but filter the manually registered clusters
QueryWrapper
<
ClusterInstance
>
clusterDeleteWrapper
=
new
QueryWrapper
<>();
List
<
Integer
>
clusterDeleteIds
=
deleteList
.
stream
().
map
(
JobInstance:
:
getClusterId
).
collect
(
Collectors
.
toList
());
clusterDeleteWrapper
.
lambda
()
.
in
(
true
,
ClusterInstance:
:
getId
,
clusterDeleteIds
)
.
eq
(
ClusterInstance:
:
getAutoRegisters
,
true
);
jobInstanceService
.
remove
(
deleteWrapper
);
jobHistoryService
.
removeBatchByIds
(
historyDeleteIds
);
clusterService
.
remove
(
clusterDeleteWrapper
);
if
(
Asserts
.
isNotNullCollection
(
deleteList
))
{
jobInstanceService
.
remove
(
deleteWrapper
);
}
if
(
Asserts
.
isNotNullCollection
(
historyDeleteIds
))
{
jobHistoryService
.
removeBatchByIds
(
historyDeleteIds
);
}
if
(
Asserts
.
isNotNullCollection
(
clusterDeleteIds
))
{
// Delete the cluster from the instance to be deleted, but filter the manually registered clusters
QueryWrapper
<
ClusterInstance
>
clusterDeleteWrapper
=
new
QueryWrapper
<>();
clusterDeleteWrapper
.
lambda
()
.
in
(
true
,
ClusterInstance:
:
getId
,
clusterDeleteIds
)
.
eq
(
ClusterInstance:
:
getAutoRegisters
,
true
);
clusterService
.
remove
(
clusterDeleteWrapper
);
}
}
}
}
...
...
dinky-admin/src/main/java/org/dinky/service/impl/ClusterInstanceServiceImpl.java
View file @
9b4bd242
...
...
@@ -201,6 +201,7 @@ public class ClusterInstanceServiceImpl extends SuperServiceImpl<ClusterInstance
}
GatewayConfig
gatewayConfig
=
GatewayConfig
.
build
(
FlinkClusterConfig
.
create
(
clusterCfg
.
getType
(),
clusterCfg
.
getConfigJson
()));
gatewayConfig
.
setType
(
gatewayConfig
.
getType
().
getSessionType
());
GatewayResult
gatewayResult
=
JobManager
.
deploySessionCluster
(
gatewayConfig
);
return
registersCluster
(
ClusterInstanceDTO
.
autoRegistersClusterDTO
(
gatewayResult
.
getWebURL
().
replace
(
"http://"
,
""
),
...
...
dinky-core/src/main/java/org/dinky/job/JobManager.java
View file @
9b4bd242
...
...
@@ -240,6 +240,7 @@ public class JobManager {
@ProcessStep
(
type
=
ProcessStepType
.
SUBMIT_EXECUTE
)
public
JobResult
executeJarSql
(
String
statement
)
throws
Exception
{
job
=
Job
.
build
(
runMode
,
config
,
executorConfig
,
executor
,
statement
,
useGateway
);
ready
();
StreamGraph
streamGraph
=
JobJarStreamGraphBuilder
.
build
(
this
).
getJarStreamGraph
(
statement
,
getDinkyClassLoader
());
try
{
...
...
dinky-gateway/src/main/java/org/dinky/gateway/enums/GatewayType.java
View file @
9b4bd242
...
...
@@ -62,7 +62,14 @@ public enum GatewayType {
}
public
static
GatewayType
getSessionType
(
String
value
)
{
if
(
value
.
equals
(
"Kubernetes"
))
{
if
(
value
.
contains
(
"kubernetes"
))
{
return
GatewayType
.
KUBERNETES_SESSION
;
}
return
GatewayType
.
YARN_SESSION
;
}
public
GatewayType
getSessionType
()
{
if
(
longValue
.
contains
(
"kubernetes"
))
{
return
GatewayType
.
KUBERNETES_SESSION
;
}
return
GatewayType
.
YARN_SESSION
;
...
...
dinky-web/src/locales/en-US/pages.ts
View file @
9b4bd242
...
...
@@ -351,6 +351,7 @@ export default {
'pages.datastudio.editor.stop.job'
:
'Stop job'
,
'pages.datastudio.editor.stop.jobConfirm'
:
'Are you sure to stop the job [{jobName}]? '
,
'pages.datastudio.editor.submitting'
:
'The new task [{jobName}] is executing'
,
'pages.datastudio.editor.checking'
:
'The task [{jobName}] is checking'
,
'pages.datastudio.editor.debugging'
:
'The new task [{jobName}] is debugging'
,
'pages.datastudio.editor.onlyread'
:
'Task has been published, modification is prohibited, please go offline first'
,
...
...
dinky-web/src/locales/zh-CN/pages.ts
View file @
9b4bd242
...
...
@@ -341,6 +341,7 @@ export default {
'pages.datastudio.editor.stop.job'
:
'停止作业'
,
'pages.datastudio.editor.stop.jobConfirm'
:
'确定停止作业【{jobName}】吗?'
,
'pages.datastudio.editor.submitting'
:
'新任务【{jobName}】正在执行'
,
'pages.datastudio.editor.checking'
:
'任务【{jobName}】正在检查'
,
'pages.datastudio.editor.debugging'
:
'新任务【{jobName}】正在调试'
,
'pages.datastudio.editor.onlyread'
:
'任务已发布,禁止修改,请先下线任务'
,
'pages.datastudio.editor.notsave'
:
'当前修改内容未保存!'
,
...
...
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