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
0bac91f0
Unverified
Commit
0bac91f0
authored
Nov 22, 2022
by
高岩
Committed by
GitHub
Nov 22, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Optimize k8s submission pages (#1283)
* Optimize k8s submission pages * Optimize k8s submission pages Co-authored-by: steve <woai1998>
parent
d7963f03
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
201 additions
and
71 deletions
+201
-71
TaskServiceImpl.java
...src/main/java/com/dlink/service/impl/TaskServiceImpl.java
+7
-2
JobConfig.java
dlink-core/src/main/java/com/dlink/job/JobConfig.java
+11
-4
AppConfig.java
...way/src/main/java/com/dlink/gateway/config/AppConfig.java
+1
-0
index.tsx
dlink-web/src/components/Studio/StudioKubernetes/index.tsx
+43
-28
index.tsx
...s/Studio/StudioRightTool/StudioKubernetesConfig/index.tsx
+64
-4
pages.ts
dlink-web/src/locales/en-US/pages.ts
+20
-0
pages.ts
dlink-web/src/locales/zh-CN/pages.ts
+21
-0
ClusterConfigurationForm.tsx
...sterConfiguration/components/ClusterConfigurationForm.tsx
+0
-0
conf.ts
dlink-web/src/pages/ClusterConfiguration/conf.ts
+34
-33
No files found.
dlink-admin/src/main/java/com/dlink/service/impl/TaskServiceImpl.java
View file @
0bac91f0
...
@@ -819,8 +819,12 @@ public class TaskServiceImpl extends SuperServiceImpl<TaskMapper, Task> implemen
...
@@ -819,8 +819,12 @@ public class TaskServiceImpl extends SuperServiceImpl<TaskMapper, Task> implemen
// support custom K8s app submit, rather than clusterConfiguration
// support custom K8s app submit, rather than clusterConfiguration
else
if
(
Dialect
.
KUBERNETES_APPLICATION
.
equalsVal
(
task
.
getDialect
())
else
if
(
Dialect
.
KUBERNETES_APPLICATION
.
equalsVal
(
task
.
getDialect
())
&&
GatewayType
.
KUBERNETES_APPLICATION
.
equalsValue
(
config
.
getType
()))
{
&&
GatewayType
.
KUBERNETES_APPLICATION
.
equalsValue
(
config
.
getType
()))
{
Map
<
String
,
Object
>
gatewayConfig
=
JSONUtil
.
toMap
(
task
.
getStatement
(),
String
.
class
,
Object
.
class
);
Map
<
String
,
Object
>
taskConfig
=
JSONUtil
.
toMap
(
task
.
getStatement
(),
String
.
class
,
Object
.
class
);
config
.
buildGatewayConfig
(
gatewayConfig
);
Map
<
String
,
Object
>
clusterConfiguration
=
clusterConfigurationService
.
getGatewayConfig
(
task
.
getClusterConfigurationId
());
clusterConfiguration
.
putAll
((
Map
<
String
,
Object
>)
taskConfig
.
get
(
"appConfig"
));
clusterConfiguration
.
put
(
"taskCustomConfig"
,
taskConfig
);
config
.
buildGatewayConfig
(
clusterConfiguration
);
}
else
{
}
else
{
Map
<
String
,
Object
>
gatewayConfig
=
Map
<
String
,
Object
>
gatewayConfig
=
clusterConfigurationService
.
getGatewayConfig
(
task
.
getClusterConfigurationId
());
clusterConfigurationService
.
getGatewayConfig
(
task
.
getClusterConfigurationId
());
...
@@ -867,6 +871,7 @@ public class TaskServiceImpl extends SuperServiceImpl<TaskMapper, Task> implemen
...
@@ -867,6 +871,7 @@ public class TaskServiceImpl extends SuperServiceImpl<TaskMapper, Task> implemen
config
.
setSavePointPath
(
null
);
config
.
setSavePointPath
(
null
);
}
}
config
.
setVariables
(
fragmentVariableService
.
listEnabledVariables
());
config
.
setVariables
(
fragmentVariableService
.
listEnabledVariables
());
config
.
getGatewayConfig
().
getAppConfig
().
setParallelism
(
task
.
getParallelism
());
return
config
;
return
config
;
}
}
...
...
dlink-core/src/main/java/com/dlink/job/JobConfig.java
View file @
0bac91f0
...
@@ -239,10 +239,17 @@ public class JobConfig {
...
@@ -239,10 +239,17 @@ public class JobConfig {
gatewayConfig
.
setFlinkConfig
(
FlinkConfig
.
build
((
Map
<
String
,
String
>)
config
.
get
(
"flinkConfig"
)));
gatewayConfig
.
setFlinkConfig
(
FlinkConfig
.
build
((
Map
<
String
,
String
>)
config
.
get
(
"flinkConfig"
)));
}
}
if
(
config
.
containsKey
(
"kubernetesConfig"
))
{
if
(
config
.
containsKey
(
"kubernetesConfig"
))
{
Map
<
String
,
Object
>
kubernetesConfig
=
(
Map
<
String
,
Object
>)
config
.
get
(
"kubernetesConfig"
);
Map
<
String
,
String
>
kubernetesConfig
=
(
Map
<
String
,
String
>)
config
.
get
(
"kubernetesConfig"
);
// 构建GatewayConfig时,将k8s集群默认配置和自定义参数配置加载到FlinkConfig里
gatewayConfig
.
getFlinkConfig
().
getConfiguration
().
putAll
(
kubernetesConfig
);
for
(
Map
.
Entry
<
String
,
Object
>
entry
:
kubernetesConfig
.
entrySet
())
{
}
gatewayConfig
.
getFlinkConfig
().
getConfiguration
().
put
(
entry
.
getKey
(),
entry
.
getValue
().
toString
());
// at present only k8s task have this
if
(
config
.
containsKey
(
"taskCustomConfig"
))
{
Map
<
String
,
Map
<
String
,
String
>>
taskCustomConfig
=
(
Map
<
String
,
Map
<
String
,
String
>>)
config
.
get
(
"taskCustomConfig"
);
if
(
taskCustomConfig
.
containsKey
(
"kubernetesConfig"
))
{
gatewayConfig
.
getFlinkConfig
().
getConfiguration
().
putAll
(
taskCustomConfig
.
get
(
"kubernetesConfig"
));
}
if
(
taskCustomConfig
.
containsKey
(
"flinkConfig"
))
{
gatewayConfig
.
getFlinkConfig
().
getConfiguration
().
putAll
(
taskCustomConfig
.
get
(
"flinkConfig"
));
}
}
}
}
}
}
...
...
dlink-gateway/src/main/java/com/dlink/gateway/config/AppConfig.java
View file @
0bac91f0
...
@@ -36,6 +36,7 @@ public class AppConfig {
...
@@ -36,6 +36,7 @@ public class AppConfig {
private
String
userJarPath
;
private
String
userJarPath
;
private
String
[]
userJarParas
;
private
String
[]
userJarParas
;
private
String
userJarMainAppClass
;
private
String
userJarMainAppClass
;
private
Integer
parallelism
;
public
AppConfig
()
{
public
AppConfig
()
{
}
}
...
...
dlink-web/src/components/Studio/StudioKubernetes/index.tsx
View file @
0bac91f0
...
@@ -25,9 +25,7 @@ import {useState} from "react";
...
@@ -25,9 +25,7 @@ import {useState} from "react";
import
{
import
{
APP_CONFIG_LIST
,
APP_CONFIG_LIST
,
Config
,
Config
,
FLINK_CONFIG_LIST
,
FLINK_CONFIG_NAME_LIST
,
FLINK_CONFIG_NAME_LIST
,
KUBERNETES_CONFIG_LIST
,
KUBERNETES_CONFIG_NAME_LIST
KUBERNETES_CONFIG_NAME_LIST
}
from
"@/pages/ClusterConfiguration/conf"
;
}
from
"@/pages/ClusterConfiguration/conf"
;
import
{
MinusCircleOutlined
,
PlusOutlined
}
from
"@ant-design/icons"
;
import
{
MinusCircleOutlined
,
PlusOutlined
}
from
"@ant-design/icons"
;
...
@@ -50,6 +48,34 @@ const StudioKubernetes = (props: any) => {
...
@@ -50,6 +48,34 @@ const StudioKubernetes = (props: any) => {
const
[
form
]
=
Form
.
useForm
();
const
[
form
]
=
Form
.
useForm
();
const
CUSTOM_KUBERNETS_CONFIG_LIST
:
Config
[]
=
[
{
name
:
'kubernetes.jobmanager.cpu'
,
lable
:
'kubernetes.jobmanager.cpu'
,
showType
:
'input'
,
placeholder
:
l
(
'pages.registerCenter.clusterConfig.help.kubernets.jmcpu'
),
},
{
name
:
'kubernetes.taskmanager.cpu'
,
lable
:
'kubernetes.taskmanager.cpu'
,
showType
:
'input'
,
placeholder
:
l
(
'pages.registerCenter.clusterConfig.help.kubernets.tmcpu'
),
},
];
const
CUSTOM_FLINK_CONFIG_LIST
:
Config
[]
=
[
{
name
:
'jobmanager.memory.process.size'
,
lable
:
'jobmanager.memory.process.size'
,
placeholder
:
l
(
'pages.registerCenter.clusterConfig.help.kubernets.jobManagerMemory'
),
},
{
name
:
'taskmanager.memory.process.size'
,
lable
:
'taskmanager.memory.process.size'
,
placeholder
:
l
(
'pages.registerCenter.clusterConfig.help.kubernets.taskManagerMemory'
),
},
{
name
:
'taskmanager.numberOfTaskSlots'
,
lable
:
'taskmanager.numberOfTaskSlots'
,
placeholder
:
''
,
}
];
//Separate normal configuration and user-defined configuration.
//Separate normal configuration and user-defined configuration.
function
addMapToList
(
map
:
Record
<
string
,
unknown
>
,
keys
:
string
[])
{
function
addMapToList
(
map
:
Record
<
string
,
unknown
>
,
keys
:
string
[])
{
const
list
=
[];
const
list
=
[];
...
@@ -86,14 +112,12 @@ const StudioKubernetes = (props: any) => {
...
@@ -86,14 +112,12 @@ const StudioKubernetes = (props: any) => {
if
(
config
[
"flinkConfig"
])
{
if
(
config
[
"flinkConfig"
])
{
initValues
=
mergeConfig
(
initValues
,
config
[
"flinkConfig"
])
initValues
=
mergeConfig
(
initValues
,
config
[
"flinkConfig"
])
}
}
//App config is mix in flink config , need separated
if
(
config
[
"appConfig"
])
{
APP_CONFIG_LIST
.
forEach
((
value
,
index
)
=>
{
initValues
=
mergeConfig
(
initValues
,
config
[
"appConfig"
])
initValues
[
APP_CONFIG_LIST
[
index
].
name
]
=
config
[
APP_CONFIG_LIST
[
index
].
name
]
}
})
//user custom config set
//user custom config set
initValues
[
"flinkConfigList"
]
=
addMapToList
(
config
[
"flinkConfig"
],
FLINK_CONFIG_NAME_LIST
())
initValues
[
"flinkConfigList"
]
=
addMapToList
(
config
[
"flinkConfig"
],
FLINK_CONFIG_NAME_LIST
())
initValues
[
"kubernetesConfigList"
]
=
addMapToList
(
config
[
"kubernetesConfig"
],
KUBERNETES_CONFIG_NAME_LIST
())
initValues
[
"kubernetesConfigList"
]
=
addMapToList
(
config
[
"kubernetesConfig"
],
KUBERNETES_CONFIG_NAME_LIST
())
initValues
[
"flinkConfigPath"
]
=
config
[
"flinkConfigPath"
]
return
initValues
;
return
initValues
;
}
}
...
@@ -103,11 +127,12 @@ const StudioKubernetes = (props: any) => {
...
@@ -103,11 +127,12 @@ const StudioKubernetes = (props: any) => {
const
onValuesChange
=
(
change
:
any
,
all
:
any
)
=>
{
const
onValuesChange
=
(
change
:
any
,
all
:
any
)
=>
{
all
.
type
=
"Kubernetes"
all
.
type
=
"Kubernetes"
const
values
=
getConfig
(
all
)
const
values
=
getConfig
(
all
)
let
appConfig
=
{}
APP_CONFIG_LIST
.
forEach
((
value
,
index
)
=>
{
APP_CONFIG_LIST
.
forEach
((
value
,
index
)
=>
{
values
[
APP_CONFIG_LIST
[
index
].
name
]
=
all
[
APP_CONFIG_LIST
[
index
].
name
]
appConfig
[
APP_CONFIG_LIST
[
index
].
name
]
=
all
[
APP_CONFIG_LIST
[
index
].
name
]
})
})
setFormVals
(
all
)
setFormVals
(
all
)
props
.
saveSql
(
JSON
.
stringify
(
values
))
props
.
saveSql
(
JSON
.
stringify
(
{...
values
,
"appConfig"
:
appConfig
}
))
}
}
// build pre-defined config item
// build pre-defined config item
...
@@ -120,9 +145,7 @@ const StudioKubernetes = (props: any) => {
...
@@ -120,9 +145,7 @@ const StudioKubernetes = (props: any) => {
label=
{
configItem
.
lable
}
label=
{
configItem
.
lable
}
help=
{
configItem
.
help
}
help=
{
configItem
.
help
}
>
>
<
Input
placeholder=
{
configItem
.
placeholder
}
<
Input
placeholder=
{
configItem
.
placeholder
}
/>
// defaultValue={configItem.defaultValue}
/>
</
Form
.
Item
>)
</
Form
.
Item
>)
});
});
...
@@ -171,24 +194,16 @@ const StudioKubernetes = (props: any) => {
...
@@ -171,24 +194,16 @@ const StudioKubernetes = (props: any) => {
const
renderContent
=
()
=>
{
const
renderContent
=
()
=>
{
return
(
return
(
<>
<>
<
Divider
>
Kubernetes 配置(必选)
</
Divider
>
<
Divider
>
{
l
(
'pages.registerCenter.clusterConfig.appConfig'
)
}
</
Divider
>
{
buildConfig
(
KUBERNETES_CONFIG_LIST
)
}
{
buildOtherConfig
(
"其他配置"
,
"kubernetesConfigList"
,
"添加一个自定义项"
)
}
<
Divider
>
App 配置(必选)
</
Divider
>
<
Form
.
Item
name=
"flinkConfigPath"
label=
"配置文件路径"
rules=
{
[{
required
:
true
,
message
:
'请输入 flink-conf.yaml 路径!'
}]
}
help=
"指定 flink-conf.yaml 的路径(末尾无/)"
>
<
Input
placeholder=
"值如 /opt/flink/conf"
/>
</
Form
.
Item
>
{
buildConfig
(
APP_CONFIG_LIST
)
}
{
buildConfig
(
APP_CONFIG_LIST
)
}
<
Divider
>
{
l
(
'pages.registerCenter.clusterConfig.k8sConfig'
)
}
</
Divider
>
{
buildConfig
(
CUSTOM_KUBERNETS_CONFIG_LIST
)
}
<
Divider
>
{
l
(
'pages.registerCenter.clusterConfig.flinkConfig'
)
}
</
Divider
>
{
buildConfig
(
CUSTOM_FLINK_CONFIG_LIST
)
}
{
buildOtherConfig
(
l
(
'pages.registerCenter.clusterConfig.otherConfig'
),
"flinkConfigList"
,
l
(
'pages.registerCenter.clusterConfig.addDefineConfig'
))
}
<
Divider
>
其他配置(可选)
</
Divider
>
{
buildConfig
(
FLINK_CONFIG_LIST
)
}
{
buildOtherConfig
(
"其他配置"
,
"flinkConfigList"
,
"添加一个自定义项"
)
}
</>
</>
);
);
};
};
...
...
dlink-web/src/components/Studio/StudioRightTool/StudioKubernetesConfig/index.tsx
View file @
0bac91f0
...
@@ -20,7 +20,7 @@
...
@@ -20,7 +20,7 @@
import
{
connect
}
from
"umi"
;
import
{
connect
}
from
"umi"
;
import
{
StateType
}
from
"@/pages/DataStudio/model"
;
import
{
StateType
}
from
"@/pages/DataStudio/model"
;
import
{
Button
,
Col
,
Form
,
Input
,
Row
,
Select
,
Tooltip
}
from
"antd"
;
import
{
Button
,
Col
,
Form
,
Input
,
InputNumber
,
Row
,
Select
,
Tag
,
Tooltip
}
from
"antd"
;
import
{
MinusSquareOutlined
}
from
"@ant-design/icons"
;
import
{
MinusSquareOutlined
}
from
"@ant-design/icons"
;
import
styles
from
"./index.less"
;
import
styles
from
"./index.less"
;
import
{
useEffect
}
from
"react"
;
import
{
useEffect
}
from
"react"
;
...
@@ -33,7 +33,33 @@ import {l} from "@/utils/intl";
...
@@ -33,7 +33,33 @@ import {l} from "@/utils/intl";
const
{
Option
}
=
Select
;
const
{
Option
}
=
Select
;
const
StudioKubernetesConfig
=
(
props
:
any
)
=>
{
const
StudioKubernetesConfig
=
(
props
:
any
)
=>
{
const
{
current
,
form
,
dispatch
,
tabs
,
group
,
toolHeight
}
=
props
;
const
{
sessionCluster
,
clusterConfiguration
,
current
,
form
,
dispatch
,
tabs
,
currentSession
,
env
,
group
,
toolHeight
}
=
props
;
const
getClusterConfigurationOptions
=
()
=>
{
const
itemList
=
[];
for
(
const
item
of
clusterConfiguration
)
{
const
tag
=
(<><
Tag
color=
{
item
.
enabled
?
"processing"
:
"error"
}
>
{
item
.
type
}
</
Tag
>
{
item
.
alias
===
""
?
item
.
name
:
item
.
alias
}
</>);
//opeartor mode can not have normal application config
if
(
current
.
task
.
type
==
'kubernetes-application-operator'
&&
item
.
type
==
'FlinkKubernetesOperator'
){
itemList
.
push
(<
Option
key=
{
item
.
id
}
value=
{
item
.
id
}
label=
{
tag
}
>
{
tag
}
</
Option
>)
}
else
if
(
current
.
task
.
type
!=
'kubernetes-application-operator'
&&
item
.
type
!=
'FlinkKubernetesOperator'
){
//if not operator mode , add it normal
itemList
.
push
(<
Option
key=
{
item
.
id
}
value=
{
item
.
id
}
label=
{
tag
}
>
{
tag
}
</
Option
>)
}
}
return
itemList
;
};
const
getGroupOptions
=
()
=>
{
const
getGroupOptions
=
()
=>
{
...
@@ -49,8 +75,6 @@ const StudioKubernetesConfig = (props: any) => {
...
@@ -49,8 +75,6 @@ const StudioKubernetesConfig = (props: any) => {
};
};
useEffect
(()
=>
{
useEffect
(()
=>
{
//Force set type k8s
current
.
task
.
type
=
RUN_MODE
.
KUBERNETES_APPLICATION
form
.
setFieldsValue
(
current
.
task
);
form
.
setFieldsValue
(
current
.
task
);
},
[
current
.
task
]);
},
[
current
.
task
]);
...
@@ -92,6 +116,42 @@ const StudioKubernetesConfig = (props: any) => {
...
@@ -92,6 +116,42 @@ const StudioKubernetesConfig = (props: any) => {
className=
{
styles
.
form_setting
}
className=
{
styles
.
form_setting
}
onValuesChange=
{
onValuesChange
}
onValuesChange=
{
onValuesChange
}
>
>
<
Form
.
Item
label=
"执行模式"
className=
{
styles
.
form_item
}
name=
"type"
tooltip=
'指定 Flink 任务的执行模式,默认为 KUBERNETES_APPLICATION'
>
<
Select
defaultValue=
{
RUN_MODE
.
KUBERNETES_APPLICATION
}
value=
{
RUN_MODE
.
KUBERNETES_APPLICATION
}
>
<
Option
value=
{
RUN_MODE
.
KUBERNETES_APPLICATION
}
>
Kubernetes Application Native
</
Option
>
</
Select
>
</
Form
.
Item
>
<
Row
>
<
Col
span=
{
24
}
>
<
Form
.
Item
label=
"Flink集群配置"
tooltip=
{
`选择Flink集群配置进行 ${current.task.type} 模式的远程提交任务`
}
name=
"clusterConfigurationId"
className=
{
styles
.
form_item
}
>
<
Select
style=
{
{
width
:
'100%'
}
}
placeholder=
"选择Flink集群配置"
optionLabelProp=
"label"
>
{
getClusterConfigurationOptions
()
}
</
Select
>
</
Form
.
Item
>
</
Col
>
</
Row
>
<
Row
>
<
Col
span=
{
12
}
>
<
Form
.
Item
label=
"任务并行度"
className=
{
styles
.
form_item
}
name=
"parallelism"
tooltip=
"设置Flink任务的并行度,最小为 1"
>
<
InputNumber
min=
{
1
}
max=
{
9999
}
defaultValue=
{
1
}
/>
</
Form
.
Item
>
</
Col
>
</
Row
>
<
Form
.
Item
<
Form
.
Item
label=
"SavePoint策略"
className=
{
styles
.
form_item
}
name=
"savePointStrategy"
label=
"SavePoint策略"
className=
{
styles
.
form_item
}
name=
"savePointStrategy"
tooltip=
'指定 SavePoint策略,默认为禁用'
tooltip=
'指定 SavePoint策略,默认为禁用'
...
...
dlink-web/src/locales/en-US/pages.ts
View file @
0bac91f0
...
@@ -321,6 +321,26 @@ export default {
...
@@ -321,6 +321,26 @@ export default {
'pages.registerCenter.clusterConfig.flinkConfigPathPlaceholder'
:
'Please enter the flink-conf.yaml path! Values like /opt/module/flink/conf '
,
'pages.registerCenter.clusterConfig.flinkConfigPathPlaceholder'
:
'Please enter the flink-conf.yaml path! Values like /opt/module/flink/conf '
,
'pages.registerCenter.clusterConfig.flinkConfigPathHelp'
:
'Please enter the flink-conf.yaml path! Values like /opt/module/flink/conf '
,
'pages.registerCenter.clusterConfig.flinkConfigPathHelp'
:
'Please enter the flink-conf.yaml path! Values like /opt/module/flink/conf '
,
// kubernets page
'pages.registerCenter.clusterConfig.appConfig'
:
'App Config'
,
'pages.registerCenter.clusterConfig.kubernets.version'
:
'Flink Version'
,
'pages.registerCenter.clusterConfig.kubernets.unsupportBatch'
:
'Not support batch'
,
'pages.registerCenter.clusterConfig.submit.type'
:
'Deploy mode'
,
'pages.registerCenter.clusterConfig.jar.path'
:
'jar path in image'
,
'pages.registerCenter.clusterConfig.jar.class'
:
'main class'
,
'pages.registerCenter.clusterConfig.jar.args'
:
'app args'
,
'pages.registerCenter.clusterConfig.help.kubernets.namespace'
:
'kubernets namespace'
,
'pages.registerCenter.clusterConfig.help.kubernets.image'
:
'Flink image'
,
'pages.registerCenter.clusterConfig.help.kubernets.jmcpu'
:
'jobmanager cpu config'
,
'pages.registerCenter.clusterConfig.help.kubernets.tmcpu'
:
'taskmanager cpu config'
,
'pages.registerCenter.clusterConfig.help.kubernets.account'
:
'kubernets account,default is default'
,
'pages.registerCenter.clusterConfig.help.kubernets.defaultTemplate'
:
'Optional,default JobManager,TaskManager template conf!'
,
'pages.registerCenter.clusterConfig.help.kubernets.jobManagerTemplate'
:
'Optional,JobManager template '
,
'pages.registerCenter.clusterConfig.help.kubernets.taskManagerTemplate'
:
'Optional,TaskManager template'
,
'pages.registerCenter.clusterConfig.help.kubernets.jobManagerMemory'
:
'Optional,JobManager memory'
,
'pages.registerCenter.clusterConfig.help.kubernets.taskManagerMemory'
:
'Optional,taskManagerMemory memory'
,
'pages.registerCenter.alert.instanceManagement'
:
'Alarm Instance Management'
,
'pages.registerCenter.alert.instanceManagement'
:
'Alarm Instance Management'
,
'pages.registerCenter.alert.instance.name'
:
'Name'
,
'pages.registerCenter.alert.instance.name'
:
'Name'
,
...
...
dlink-web/src/locales/zh-CN/pages.ts
View file @
0bac91f0
...
@@ -324,6 +324,27 @@ export default {
...
@@ -324,6 +324,27 @@ export default {
'pages.registerCenter.clusterConfig.flinkConfigPathPlaceholder'
:
'请输入 flink-conf.yaml 路径!值如 /opt/module/flink/conf '
,
'pages.registerCenter.clusterConfig.flinkConfigPathPlaceholder'
:
'请输入 flink-conf.yaml 路径!值如 /opt/module/flink/conf '
,
'pages.registerCenter.clusterConfig.flinkConfigPathHelp'
:
'请输入 flink-conf.yaml 路径!值如 /opt/module/flink/conf '
,
'pages.registerCenter.clusterConfig.flinkConfigPathHelp'
:
'请输入 flink-conf.yaml 路径!值如 /opt/module/flink/conf '
,
// K8s页面相关
'pages.registerCenter.clusterConfig.appConfig'
:
'App 配置'
,
'pages.registerCenter.clusterConfig.kubernets.version'
:
'Flink 版本'
,
'pages.registerCenter.clusterConfig.kubernets.unsupportBatch'
:
'不支持批任务'
,
'pages.registerCenter.clusterConfig.submit.type'
:
'部署方式'
,
'pages.registerCenter.clusterConfig.jar.path'
:
'镜像内Jar路径'
,
'pages.registerCenter.clusterConfig.jar.class'
:
'启动类'
,
'pages.registerCenter.clusterConfig.jar.args'
:
'启动参数'
,
'pages.registerCenter.clusterConfig.help.kubernets.namespace'
:
'kubernets命名空间'
,
'pages.registerCenter.clusterConfig.help.kubernets.image'
:
'Flink镜像地址'
,
'pages.registerCenter.clusterConfig.help.kubernets.jmcpu'
:
'jobmanager cpu配置'
,
'pages.registerCenter.clusterConfig.help.kubernets.tmcpu'
:
'taskmanager cpu配置'
,
'pages.registerCenter.clusterConfig.help.kubernets.account'
:
'kubernets 提交使用的账号,默认default'
,
'pages.registerCenter.clusterConfig.help.kubernets.defaultTemplate'
:
'可选,默认JobManager,TaskManager 的template配置!'
,
'pages.registerCenter.clusterConfig.help.kubernets.jobManagerTemplate'
:
'可选,JobManager 的template配置! 会覆盖kubernetes.pod-template配置'
,
'pages.registerCenter.clusterConfig.help.kubernets.taskManagerTemplate'
:
'可选,TaskManager 的template配置!会覆盖kubernetes.pod-template配置'
,
'pages.registerCenter.clusterConfig.help.kubernets.jobManagerMemory'
:
'可选,JobManager 的内存配置'
,
'pages.registerCenter.clusterConfig.help.kubernets.taskManagerMemory'
:
'可选,taskManagerMemory 的内存配置'
,
'pages.registerCenter.alert.instanceManagement'
:
'报警实例管理'
,
'pages.registerCenter.alert.instanceManagement'
:
'报警实例管理'
,
'pages.registerCenter.alert.instance.name'
:
'名称'
,
'pages.registerCenter.alert.instance.name'
:
'名称'
,
'pages.registerCenter.alert.instance.namePleaseHolder'
:
'请输入告警实例名称'
,
'pages.registerCenter.alert.instance.namePleaseHolder'
:
'请输入告警实例名称'
,
...
...
dlink-web/src/pages/ClusterConfiguration/components/ClusterConfigurationForm.tsx
View file @
0bac91f0
This diff is collapsed.
Click to expand it.
dlink-web/src/pages/ClusterConfiguration/conf.ts
View file @
0bac91f0
...
@@ -25,6 +25,8 @@ export type Config = {
...
@@ -25,6 +25,8 @@ export type Config = {
placeholder
:
string
placeholder
:
string
defaultValue
?:
string
defaultValue
?:
string
help
?:
string
help
?:
string
showOnSubmitType
?:
string
showType
?:
string
}
}
export
const
HADOOP_CONFIG_LIST
:
Config
[]
=
[{
export
const
HADOOP_CONFIG_LIST
:
Config
[]
=
[{
...
@@ -35,74 +37,73 @@ export const HADOOP_CONFIG_LIST: Config[] = [{
...
@@ -35,74 +37,73 @@ export const HADOOP_CONFIG_LIST: Config[] = [{
export
const
KUBERNETES_CONFIG_LIST
:
Config
[]
=
[{
export
const
KUBERNETES_CONFIG_LIST
:
Config
[]
=
[{
name
:
'kubernetes.namespace'
,
name
:
'kubernetes.namespace'
,
lable
:
'kubernetes.namespace'
,
lable
:
'kubernetes.namespace'
,
placeholder
:
'dlink'
,
placeholder
:
l
(
'pages.registerCenter.clusterConfig.help.kubernets.namespace'
),
showType
:
'input'
},{
},{
name
:
'kubernetes.container.image'
,
name
:
'kubernetes.container.image'
,
lable
:
'kubernetes.container.image'
,
lable
:
'kubernetes.container.image'
,
placeholder
:
'dlink'
,
placeholder
:
l
(
'pages.registerCenter.clusterConfig.help.kubernets.image'
),
showType
:
'input'
},{
},{
name
:
'kubernetes.rest-service.exposed.type'
,
name
:
'kubernetes.rest-service.exposed.type'
,
lable
:
'kubernetes.rest-service.exposed.type'
,
lable
:
'kubernetes.rest-service.exposed.type'
,
placeholder
:
'NodePort'
,
placeholder
:
'NodePort'
,
defaultValue
:
'NodePort'
,
defaultValue
:
''
,
}];
showType
:
'input'
,
showOnSubmitType
:
'Kubernetes'
},{
name
:
'kubernetes.jobmanager.cpu'
,
lable
:
'kubernetes.jobmanager.cpu'
,
showType
:
'input'
,
placeholder
:
l
(
'pages.registerCenter.clusterConfig.help.kubernets.jmcpu'
),
},
{
name
:
'kubernetes.taskmanager.cpu'
,
lable
:
'kubernetes.taskmanager.cpu'
,
showType
:
'input'
,
placeholder
:
l
(
'pages.registerCenter.clusterConfig.help.kubernets.tmcpu'
),
}
];
export
const
FLINK_CONFIG_LIST
:
Config
[]
=
[
export
const
FLINK_CONFIG_LIST
:
Config
[]
=
[
{
{
name
:
'kubernetes.pod-template-file'
,
lable
:
'kubernetes.pod-template-file'
,
placeholder
:
'pod-template-file path'
,
help
:
'可选,如果配置需要指定到具体文件'
},{
name
:
'jobmanager.memory.process.size'
,
name
:
'jobmanager.memory.process.size'
,
lable
:
'jobmanager.memory.process.size'
,
lable
:
'jobmanager.memory.process.size'
,
placeholder
:
'1600m jobmanager內存設置'
,
placeholder
:
l
(
'pages.registerCenter.clusterConfig.help.kubernets.jobManagerMemory'
)
,
},
{
},
{
name
:
'taskmanager.memory.process.size'
,
name
:
'taskmanager.memory.process.size'
,
lable
:
'taskmanager.memory.process.size'
,
lable
:
'taskmanager.memory.process.size'
,
placeholder
:
'2048m taskmanager內存設置'
,
placeholder
:
l
(
'pages.registerCenter.clusterConfig.help.kubernets.taskManagerMemory'
)
,
},
{
},
{
name
:
'taskmanager.memory.framework.heap.size'
,
name
:
'taskmanager.memory.framework.heap.size'
,
lable
:
'taskmanager.memory.framework.heap.size'
,
lable
:
'taskmanager.memory.framework.heap.size'
,
placeholder
:
'
1024m
'
,
placeholder
:
''
,
},
{
},
{
name
:
'taskmanager.numberOfTaskSlots'
,
name
:
'taskmanager.numberOfTaskSlots'
,
lable
:
'taskmanager.numberOfTaskSlots'
,
lable
:
'taskmanager.numberOfTaskSlots'
,
placeholder
:
'1'
,
placeholder
:
''
,
},
{
name
:
'kubernetes.jobmanager.cpu'
,
lable
:
'kubernetes.jobmanager.cpu'
,
placeholder
:
'1'
,
},
{
name
:
'kubernetes.taskmanager.cpu'
,
lable
:
'kubernetes.taskmanager.cpu'
,
placeholder
:
'1'
,
},
{
name
:
'parallelism.default'
,
lable
:
'parallelism.default'
,
placeholder
:
'1'
,
},
{
},
{
name
:
'state.savepoints.dir'
,
name
:
'state.savepoints.dir'
,
lable
:
'state.savepoints.dir'
,
lable
:
'state.savepoints.dir'
,
placeholder
:
'hdfs:///flink/savepoints/'
,
placeholder
:
'hdfs:///flink/savepoints/'
,
},
{
name
:
'state.checkpoints.dir'
,
lable
:
'state.checkpoints.dir'
,
placeholder
:
'hdfs:///flink/savepoints/'
,
}
}
];
];
export
const
APP_CONFIG_LIST
:
Config
[]
=
[{
export
const
APP_CONFIG_LIST
:
Config
[]
=
[{
name
:
'userJarPath'
,
name
:
'userJarPath'
,
lable
:
'镜像内Jar路径'
,
lable
:
l
(
'pages.registerCenter.clusterConfig.jar.path'
)
,
placeholder
:
'local:///opt/example.jar'
,
placeholder
:
'local:///opt/example.jar'
,
},
{
},
{
name
:
'userJarMainAppClass'
,
name
:
'userJarMainAppClass'
,
lable
:
'启动类'
,
lable
:
l
(
'pages.registerCenter.clusterConfig.jar.class'
)
,
placeholder
:
'com.example.app'
,
placeholder
:
'com.example.app'
,
},
{
},
{
name
:
'userJarParas'
,
name
:
'userJarParas'
,
lable
:
'启动参数'
,
lable
:
l
(
'pages.registerCenter.clusterConfig.jar.args'
),
placeholder
:
'值如 -conf test.properties'
,
placeholder
:
'example: -conf test.properties'
,
},{
name
:
'state.savepoints.dir'
,
lable
:
'state.savepoints.dir'
,
placeholder
:
'hdfs:///flink/savepoints/'
,
}
}
];
];
...
...
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