diff --git a/scaleph-api/src/main/java/cn/sliew/scaleph/api/config/SwaggerConfig.java b/scaleph-api/src/main/java/cn/sliew/scaleph/api/config/SwaggerConfig.java index 5ff4c9fca..aa114bcca 100644 --- a/scaleph-api/src/main/java/cn/sliew/scaleph/api/config/SwaggerConfig.java +++ b/scaleph-api/src/main/java/cn/sliew/scaleph/api/config/SwaggerConfig.java @@ -58,7 +58,7 @@ private Info apiInfo() { return new Info() .title("Scaleph API文档") .description("Scaleph API文档") - .version("1.0.5-SNAPSHOT") + .version("2.0.3-SNAPSHOT") .termsOfService("https://flowerfine.github.io/scaleph-website/zh") .license(new License().name("Apache 2.0").url("https://github.com/flowerfine/scaleph/blob/dev/LICENSE")) .contact(contact()); diff --git a/scaleph-api/src/main/java/cn/sliew/scaleph/api/controller/ws/WsFlinkKubernetesJobController.java b/scaleph-api/src/main/java/cn/sliew/scaleph/api/controller/ws/WsFlinkKubernetesJobController.java index bdaff761f..f2b9cadf1 100644 --- a/scaleph-api/src/main/java/cn/sliew/scaleph/api/controller/ws/WsFlinkKubernetesJobController.java +++ b/scaleph-api/src/main/java/cn/sliew/scaleph/api/controller/ws/WsFlinkKubernetesJobController.java @@ -38,6 +38,7 @@ import javax.validation.Valid; import java.net.URI; import java.util.List; +import java.util.Optional; @Tag(name = "Flink Kubernetes管理-Job管理") @RestController @@ -171,6 +172,17 @@ public ResponseEntity> listInstances(@Vali return new ResponseEntity<>(result, HttpStatus.OK); } + @Logging + @GetMapping("instances/current") + @Operation(summary = "获取任务当前实例", description = "获取任务当前实例") + public ResponseEntity> currentInstance(@RequestParam("wsFlinkKubernetesJobId") Long wsFlinkKubernetesJobId) throws Exception { + Optional optional = wsFlinkKubernetesJobInstanceService.selectCurrent(wsFlinkKubernetesJobId); + if (optional.isPresent()) { + return new ResponseEntity<>(ResponseVO.success(optional.get()), HttpStatus.OK); + } + return new ResponseEntity<>(ResponseVO.error("not found"), HttpStatus.NOT_FOUND); + } + @Logging @GetMapping("/instances/asYaml/{id}") @Operation(summary = "查询 YAML 格式 Job 实例", description = "查询 YAML 格式 Job 实例") diff --git a/scaleph-dao/src/main/java/cn/sliew/scaleph/dao/entity/master/ws/WsFlinkKubernetesJobInstance.java b/scaleph-dao/src/main/java/cn/sliew/scaleph/dao/entity/master/ws/WsFlinkKubernetesJobInstance.java index b520a8b82..57c0a0eac 100644 --- a/scaleph-dao/src/main/java/cn/sliew/scaleph/dao/entity/master/ws/WsFlinkKubernetesJobInstance.java +++ b/scaleph-dao/src/main/java/cn/sliew/scaleph/dao/entity/master/ws/WsFlinkKubernetesJobInstance.java @@ -67,6 +67,9 @@ public class WsFlinkKubernetesJobInstance extends BaseDO { @TableField("user_flink_configuration") private String userFlinkConfiguration; + @TableField("merged_flink_configuration") + private String mergedFlinkConfiguration; + @TableField(value = "`state`", updateStrategy = FieldStrategy.IGNORED) private ResourceLifecycleState state; diff --git a/scaleph-dao/src/main/resources/cn/sliew/scaleph/dao/mapper/master/ws/WsFlinkKubernetesJobInstanceMapper.xml b/scaleph-dao/src/main/resources/cn/sliew/scaleph/dao/mapper/master/ws/WsFlinkKubernetesJobInstanceMapper.xml index 0c63acae2..41bf98faa 100644 --- a/scaleph-dao/src/main/resources/cn/sliew/scaleph/dao/mapper/master/ws/WsFlinkKubernetesJobInstanceMapper.xml +++ b/scaleph-dao/src/main/resources/cn/sliew/scaleph/dao/mapper/master/ws/WsFlinkKubernetesJobInstanceMapper.xml @@ -33,6 +33,7 @@ + @@ -58,6 +59,7 @@ + @@ -75,7 +77,7 @@ id, creator, create_time, editor, update_time, ws_flink_kubernetes_job_id, instance_id, parallelism, upgrade_mode, allow_non_restored_state, - job_manager, task_manager, user_flink_configuration, + job_manager, task_manager, user_flink_configuration, merged_flink_configuration, `state`, job_state, `error`, cluster_info, task_manager_info, start_time, end_time, duration diff --git a/scaleph-engine/scaleph-engine-flink-kubernetes/src/main/java/cn/sliew/scaleph/engine/flink/kubernetes/resource/definition/job/instance/FlinkDeploymentSpecHandler.java b/scaleph-engine/scaleph-engine-flink-kubernetes/src/main/java/cn/sliew/scaleph/engine/flink/kubernetes/resource/definition/job/instance/FlinkDeploymentSpecHandler.java index 06a3ff888..ca28b2ca7 100644 --- a/scaleph-engine/scaleph-engine-flink-kubernetes/src/main/java/cn/sliew/scaleph/engine/flink/kubernetes/resource/definition/job/instance/FlinkDeploymentSpecHandler.java +++ b/scaleph-engine/scaleph-engine-flink-kubernetes/src/main/java/cn/sliew/scaleph/engine/flink/kubernetes/resource/definition/job/instance/FlinkDeploymentSpecHandler.java @@ -26,7 +26,6 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; -import java.util.Map; import java.util.Optional; @Component @@ -99,7 +98,7 @@ private void addLogging(WsFlinkKubernetesJobInstanceDTO jobInstanceDTO, FlinkDep private void mergeJobInstance(WsFlinkKubernetesJobInstanceDTO jobInstanceDTO, FlinkDeploymentSpec spec) { spec.setJobManager(TemplateMerger.merge(spec.getJobManager(), jobInstanceDTO.getJobManager(), JobManagerSpec.class)); spec.setTaskManager(TemplateMerger.merge(spec.getTaskManager(), jobInstanceDTO.getTaskManager(), TaskManagerSpec.class)); - spec.setFlinkConfiguration(TemplateMerger.merge(spec.getFlinkConfiguration(), jobInstanceDTO.getUserFlinkConfiguration(), Map.class)); + spec.setFlinkConfiguration(jobInstanceDTO.getMergedFlinkConfiguration()); JobSpec job = spec.getJob(); if (jobInstanceDTO.getParallelism() != null) { job.setParallelism(jobInstanceDTO.getParallelism()); diff --git a/scaleph-engine/scaleph-engine-flink-kubernetes/src/main/java/cn/sliew/scaleph/engine/flink/kubernetes/service/convert/WsFlinkKubernetesJobInstanceConvert.java b/scaleph-engine/scaleph-engine-flink-kubernetes/src/main/java/cn/sliew/scaleph/engine/flink/kubernetes/service/convert/WsFlinkKubernetesJobInstanceConvert.java index 1b0253f2c..3683d50fd 100644 --- a/scaleph-engine/scaleph-engine-flink-kubernetes/src/main/java/cn/sliew/scaleph/engine/flink/kubernetes/service/convert/WsFlinkKubernetesJobInstanceConvert.java +++ b/scaleph-engine/scaleph-engine-flink-kubernetes/src/main/java/cn/sliew/scaleph/engine/flink/kubernetes/service/convert/WsFlinkKubernetesJobInstanceConvert.java @@ -54,6 +54,9 @@ default WsFlinkKubernetesJobInstance toDo(WsFlinkKubernetesJobInstanceDTO dto) { if (CollectionUtils.isEmpty(dto.getUserFlinkConfiguration()) == false) { entity.setUserFlinkConfiguration(JacksonUtil.toJsonString(dto.getUserFlinkConfiguration())); } + if (CollectionUtils.isEmpty(dto.getMergedFlinkConfiguration()) == false) { + entity.setMergedFlinkConfiguration(JacksonUtil.toJsonString(dto.getMergedFlinkConfiguration())); + } if (CollectionUtils.isEmpty(dto.getClusterInfo()) == false) { entity.setClusterInfo(JacksonUtil.toJsonString(dto.getClusterInfo())); } @@ -79,6 +82,9 @@ default WsFlinkKubernetesJobInstanceDTO toDto(WsFlinkKubernetesJobInstance entit if (StringUtils.hasText(entity.getUserFlinkConfiguration())) { dto.setUserFlinkConfiguration(JacksonUtil.parseJsonString(entity.getUserFlinkConfiguration(), Map.class)); } + if (StringUtils.hasText(entity.getMergedFlinkConfiguration())) { + dto.setMergedFlinkConfiguration(JacksonUtil.parseJsonString(entity.getMergedFlinkConfiguration(), Map.class)); + } if (StringUtils.hasText(entity.getClusterInfo())) { dto.setClusterInfo(JacksonUtil.parseJsonString(entity.getClusterInfo(), Map.class)); } diff --git a/scaleph-engine/scaleph-engine-flink-kubernetes/src/main/java/cn/sliew/scaleph/engine/flink/kubernetes/service/dto/WsFlinkKubernetesJobInstanceDTO.java b/scaleph-engine/scaleph-engine-flink-kubernetes/src/main/java/cn/sliew/scaleph/engine/flink/kubernetes/service/dto/WsFlinkKubernetesJobInstanceDTO.java index 99cda8b11..5a83ced58 100644 --- a/scaleph-engine/scaleph-engine-flink-kubernetes/src/main/java/cn/sliew/scaleph/engine/flink/kubernetes/service/dto/WsFlinkKubernetesJobInstanceDTO.java +++ b/scaleph-engine/scaleph-engine-flink-kubernetes/src/main/java/cn/sliew/scaleph/engine/flink/kubernetes/service/dto/WsFlinkKubernetesJobInstanceDTO.java @@ -69,6 +69,9 @@ public class WsFlinkKubernetesJobInstanceDTO extends BaseDO { @Schema(description = "user flink configuration") private Map userFlinkConfiguration; + @Schema(description = "merged flink configuration") + private Map mergedFlinkConfiguration; + @Schema(description = "deploy state") private ResourceLifecycleState state; diff --git a/scaleph-engine/scaleph-engine-flink-kubernetes/src/main/java/cn/sliew/scaleph/engine/flink/kubernetes/service/impl/WsFlinkKubernetesJobInstanceServiceImpl.java b/scaleph-engine/scaleph-engine-flink-kubernetes/src/main/java/cn/sliew/scaleph/engine/flink/kubernetes/service/impl/WsFlinkKubernetesJobInstanceServiceImpl.java index b64ed8efd..ad6eeec87 100644 --- a/scaleph-engine/scaleph-engine-flink-kubernetes/src/main/java/cn/sliew/scaleph/engine/flink/kubernetes/service/impl/WsFlinkKubernetesJobInstanceServiceImpl.java +++ b/scaleph-engine/scaleph-engine-flink-kubernetes/src/main/java/cn/sliew/scaleph/engine/flink/kubernetes/service/impl/WsFlinkKubernetesJobInstanceServiceImpl.java @@ -29,6 +29,7 @@ import cn.sliew.scaleph.dao.entity.master.ws.WsFlinkKubernetesJobInstanceSavepoint; import cn.sliew.scaleph.dao.mapper.master.ws.WsFlinkKubernetesJobInstanceMapper; import cn.sliew.scaleph.dao.mapper.master.ws.WsFlinkKubernetesJobInstanceSavepointMapper; +import cn.sliew.scaleph.engine.flink.kubernetes.operator.util.TemplateMerger; import cn.sliew.scaleph.engine.flink.kubernetes.service.param.WsFlinkKubernetesJobInstanceDeployParam; import cn.sliew.scaleph.engine.flink.kubernetes.operator.spec.FlinkDeploymentSpec; import cn.sliew.scaleph.engine.flink.kubernetes.operator.spec.JobState; @@ -161,16 +162,16 @@ public void deploy(WsFlinkKubernetesJobInstanceDeployParam param) throws Excepti if (param.getUserFlinkConfiguration() != null) { record.setUserFlinkConfiguration(JacksonUtil.toJsonString(param.getUserFlinkConfiguration())); } - wsFlinkKubernetesJobInstanceMapper.insert(record); - WsFlinkKubernetesJobInstanceDTO jobInstanceDTO = selectOne(record.getId()); - WsFlinkKubernetesJobDTO jobDTO = jobInstanceDTO.getWsFlinkKubernetesJob(); - String yaml = asYaml(record.getId()); + WsFlinkKubernetesJobDTO jobDTO = wsFlinkKubernetesJobService.selectOne(param.getWsFlinkKubernetesJobId()); Long clusterCredentialId = null; String resource = null; WatchCallbackHandler callbackHandler = null; switch (jobDTO.getDeploymentKind()) { case FLINK_DEPLOYMENT: clusterCredentialId = jobDTO.getFlinkDeployment().getClusterCredentialId(); + Map flinkConfiguration = jobDTO.getFlinkDeployment().getFlinkConfiguration(); + Map mergedFlinkConfiguration = TemplateMerger.merge(flinkConfiguration, param.getUserFlinkConfiguration(), Map.class); + record.setMergedFlinkConfiguration(JacksonUtil.toJsonString(mergedFlinkConfiguration)); resource = Constant.FLINK_DEPLOYMENT; callbackHandler = flinkDeploymentWatchCallbackHandler; break; @@ -181,6 +182,10 @@ public void deploy(WsFlinkKubernetesJobInstanceDeployParam param) throws Excepti break; default: } + wsFlinkKubernetesJobInstanceMapper.insert(record); + + WsFlinkKubernetesJobInstanceDTO jobInstanceDTO = selectOne(record.getId()); + String yaml = asYaml(record.getId()); flinkKubernetesOperatorService.deployJob(clusterCredentialId, yaml); // add watch Map lables = metadataHandler.generateLables(jobInstanceDTO); diff --git a/scaleph-ui-react/config/routes.ts b/scaleph-ui-react/config/routes.ts index 3b75a326b..3354a6b58 100644 --- a/scaleph-ui-react/config/routes.ts +++ b/scaleph-ui-react/config/routes.ts @@ -192,16 +192,7 @@ export default [ { path: '/workspace/engine/compute/flink/deployment/detail', component: './Project/Workspace/Engine/Compute/Flink/Deployment/Detail', - }, - { - name: 'job', - path: '/workspace/engine/compute/flink/job', - component: './Project/Workspace/Engine/Compute/Flink/Job', - }, - { - path: '/workspace/engine/compute/flink/job/detail', - component: './Project/Workspace/Engine/Compute/Flink/Job/Detail', - }, + } ] } ] @@ -283,6 +274,22 @@ export default [ }, ] }, + { + name: 'project.operation', + path: '/workspace/operation', + icon: 'solution', + routes: [ + { + name: 'flink', + path: '/workspace/operation/compute/flink/job', + component: './Project/Workspace/Engine/Compute/Flink/Job', + }, + { + path: '/workspace/operation/compute/flink/job/detail', + component: './Project/Workspace/Engine/Compute/Flink/Job/Detail', + } + ] + }, ] }, { diff --git a/scaleph-ui-react/src/locales/zh-CN/menu.ts b/scaleph-ui-react/src/locales/zh-CN/menu.ts index 00f192663..f4738a1f6 100644 --- a/scaleph-ui-react/src/locales/zh-CN/menu.ts +++ b/scaleph-ui-react/src/locales/zh-CN/menu.ts @@ -17,7 +17,6 @@ export default { 'menu.project.engine.compute.flink.template': '部署模板', 'menu.project.engine.compute.flink.session-cluster': 'Session 集群', 'menu.project.engine.compute.flink.deployment': 'Deployment', - 'menu.project.engine.compute.flink.job': '任务', 'menu.project.data-integration': '数据集成', 'menu.project.data-integration.seatunnel': 'SeaTunnel', 'menu.project.data-integration.flink-cdc': 'Flink CDC', @@ -27,6 +26,8 @@ export default { 'menu.project.dag-scheduler': 'DAG 调度', 'menu.project.data-service': '数据服务', 'menu.project.data-service.config': '接口配置', + 'menu.project.operation': '运维中心', + 'menu.project.operation.flink': 'Flink任务', 'menu.resource': '资源', 'menu.resource.jar': '公共 Jar', diff --git a/scaleph-ui-react/src/locales/zh-CN/pages/project.ts b/scaleph-ui-react/src/locales/zh-CN/pages/project.ts index 2bf8fd8b8..a3e1c3512 100644 --- a/scaleph-ui-react/src/locales/zh-CN/pages/project.ts +++ b/scaleph-ui-react/src/locales/zh-CN/pages/project.ts @@ -1014,17 +1014,22 @@ export default { 'pages.project.flink.kubernetes.job.detail.metrics': 'Metrics', 'pages.project.flink.kubernetes.job.detail.logs': 'Logs', + 'pages.project.flink.kubernetes.job.detail.overview': '总览', + 'pages.project.flink.kubernetes.job.detail.overview.artifact': 'Artifact', + 'pages.project.flink.kubernetes.job.detail.overview.resource': '资源详情', + 'pages.project.flink.kubernetes.job.detail.overview.configuration': 'Flink 配置', + 'pages.project.flink.kubernetes.job.detail.savepoint': '状态管理', + 'pages.project.flink.kubernetes.job.detail.savepoint.timeStamp': 'TimeStamp', + 'pages.project.flink.kubernetes.job.detail.savepoint.formatType': 'Format', + 'pages.project.flink.kubernetes.job.detail.savepoint.triggerType': 'Trigger Type', + 'pages.project.flink.kubernetes.job.detail.savepoint.location': 'Location', 'pages.project.flink.kubernetes.job.detail.yaml': 'YAML', - 'pages.project.flink.kubernetes.job.detail.instanceList': 'Intances', + 'pages.project.flink.kubernetes.job.detail.instanceList': '历史实例', 'pages.project.flink.kubernetes.job.detail.instanceList.startTime': 'Start Time', 'pages.project.flink.kubernetes.job.detail.instanceList.endTime': 'End Time', 'pages.project.flink.kubernetes.job.detail.instanceList.duration': 'Duration', 'pages.project.flink.kubernetes.job.detail.instanceList.upgradeMode': 'Upgrade Mode', - 'pages.project.flink.kubernetes.job.detail.savepoint': 'Savepoint', - 'pages.project.flink.kubernetes.job.detail.savepoint.timeStamp': 'TimeStamp', - 'pages.project.flink.kubernetes.job.detail.savepoint.formatType': 'Format', - 'pages.project.flink.kubernetes.job.detail.savepoint.triggerType': 'Trigger Type', - 'pages.project.flink.kubernetes.job.detail.savepoint.location': 'Location', + 'pages.project.doris.template': 'Template', 'pages.project.doris.template.name': '名称', diff --git a/scaleph-ui-react/src/pages/Project/Workspace/Engine/Compute/Flink/Job/Detail/Overview/ArtifactFlinkJarWeb.tsx b/scaleph-ui-react/src/pages/Project/Workspace/Engine/Compute/Flink/Job/Detail/Overview/ArtifactFlinkJarWeb.tsx new file mode 100644 index 000000000..44ac7d421 --- /dev/null +++ b/scaleph-ui-react/src/pages/Project/Workspace/Engine/Compute/Flink/Job/Detail/Overview/ArtifactFlinkJarWeb.tsx @@ -0,0 +1,90 @@ +import React, {useRef} from "react"; +import {ActionType, ProCard, ProDescriptions, ProFormInstance} from "@ant-design/pro-components"; +import {connect, useAccess, useIntl} from "@umijs/max"; +import {Props} from '@/typings'; +import {WsArtifactFlinkJar, WsFlinkKubernetesJob} from "@/services/project/typings"; +import {ProDescriptionsItemProps} from "@ant-design/pro-descriptions"; +import {ProCoreActionType} from "@ant-design/pro-utils/es/typing"; +import {Button, message, Popconfirm} from "antd"; +import { + AreaChartOutlined, + CameraOutlined, + CaretRightOutlined, + CloseOutlined, + DashboardOutlined, OrderedListOutlined, + RedoOutlined +} from "@ant-design/icons"; +import {WsFlinkKubernetesJobService} from "@/services/project/WsFlinkKubernetesJobService"; + +const ArtifactFlinkJarWeb: React.FC> = (props: any) => { + const intl = useIntl(); + const access = useAccess(); + const actionRef = useRef(); + const formRef = useRef(); + + + const descriptionColumns: ProDescriptionsItemProps[] = [ + { + title: intl.formatMessage({id: 'pages.project.artifact.name'}), + key: `name`, + renderText: (text: any, record: WsArtifactFlinkJar, index: number, action: ProCoreActionType) => { + return record.artifact?.name + } + }, + { + title: intl.formatMessage({id: 'pages.project.artifact.jar.fileName'}), + key: `fileName`, + dataIndex: 'fileName' + }, + { + title: intl.formatMessage({id: 'pages.resource.flinkRelease.version'}), + key: `flinkVersion`, + dataIndex: 'flinkVersion', + renderText: (text: any, record: WsArtifactFlinkJar, index: number, action: ProCoreActionType) => { + return record.flinkVersion?.label + } + }, + { + title: intl.formatMessage({id: 'pages.project.artifact.jar.entryClass'}), + key: `entryClass`, + dataIndex: 'entryClass' + }, + { + title: intl.formatMessage({id: 'pages.project.artifact.jar.jarParams'}), + key: `jarParams`, + dataIndex: 'jarParams', + valueType: 'jsonCode' + }, + { + title: intl.formatMessage({id: 'app.common.data.remark'}), + key: `remark`, + dataIndex: 'remark', + renderText: (text: any, record: WsArtifactFlinkJar, index: number, action: ProCoreActionType) => { + return record.artifact?.remark + } + }, + { + title: intl.formatMessage({id: 'app.common.data.createTime'}), + key: `createTime`, + dataIndex: 'createTime', + }, + { + title: intl.formatMessage({id: 'app.common.data.updateTime'}), + key: `updateTime`, + dataIndex: 'updateTime', + } + ] + + return ( + + ); +} + + +const mapModelToProps = ({flinkKubernetesJobDetail}: any) => ({flinkKubernetesJobDetail}) +export default connect(mapModelToProps)(ArtifactFlinkJarWeb); diff --git a/scaleph-ui-react/src/pages/Project/Workspace/Engine/Compute/Flink/Job/Detail/Overview/FlinkKubernetesJobConfiguration.tsx b/scaleph-ui-react/src/pages/Project/Workspace/Engine/Compute/Flink/Job/Detail/Overview/FlinkKubernetesJobConfiguration.tsx new file mode 100644 index 000000000..d004d7ee7 --- /dev/null +++ b/scaleph-ui-react/src/pages/Project/Workspace/Engine/Compute/Flink/Job/Detail/Overview/FlinkKubernetesJobConfiguration.tsx @@ -0,0 +1,52 @@ +import React, {useEffect, useState} from "react"; +import {ProColumns, ProTable} from "@ant-design/pro-components"; +import {connect, useAccess, useIntl} from "@umijs/max"; + +type Config = { + key: string; + value?: any; +}; + +const FlinkKubernetesJobDetailConfigurationWeb: React.FC = (props: any) => { + const intl = useIntl(); + const access = useAccess(); + const [dataSource, setDataSource] = useState([]) + + useEffect(() => { + if (props.flinkKubernetesJobDetail.job?.jobInstance) { + const config: Array = [] + Object.entries<[string, any][]>(props.flinkKubernetesJobDetail.job?.jobInstance?.mergedFlinkConfiguration ? {...props.flinkKubernetesJobDetail.job?.jobInstance?.mergedFlinkConfiguration} : {}).forEach(([key, value]) => { + config.push({ + key: key, + value: value + }) + }); + setDataSource(config) + } + }, [props.flinkKubernetesJobDetail.job]); + + const tableColumns: ProColumns[] = [ + { + dataIndex: 'key', + width: '40%' + }, + { + dataIndex: 'value', + }, + ] + + return ( + + rowKey="key" + columns={tableColumns} + dataSource={dataSource} + bordered + options={false} + search={false} + showHeader={false} + /> + ); +} + +const mapModelToProps = ({flinkKubernetesJobDetail}: any) => ({flinkKubernetesJobDetail}) +export default connect(mapModelToProps)(FlinkKubernetesJobDetailConfigurationWeb); diff --git a/scaleph-ui-react/src/pages/Project/Workspace/Engine/Compute/Flink/Job/Detail/Overview/FlinkKubernetesJobResourceWeb.tsx b/scaleph-ui-react/src/pages/Project/Workspace/Engine/Compute/Flink/Job/Detail/Overview/FlinkKubernetesJobResourceWeb.tsx new file mode 100644 index 000000000..85440fba2 --- /dev/null +++ b/scaleph-ui-react/src/pages/Project/Workspace/Engine/Compute/Flink/Job/Detail/Overview/FlinkKubernetesJobResourceWeb.tsx @@ -0,0 +1,69 @@ +import React from "react"; +import {ProDescriptions} from "@ant-design/pro-components"; +import {ProDescriptionsItemProps} from "@ant-design/pro-descriptions"; +import {ProCoreActionType} from "@ant-design/pro-utils/es/typing"; +import {connect, useIntl} from "@umijs/max"; +import {Props} from '@/typings'; +import {WsFlinkKubernetesJob, WsFlinkKubernetesJobInstance} from "@/services/project/typings"; + +const FlinkKubernetesJobResourceWeb: React.FC> = (props: any) => { + const intl = useIntl(); + + const descriptionColumns: ProDescriptionsItemProps[] = [ + { + title: intl.formatMessage({id: 'pages.project.flink.kubernetes.job.detail.deploy.resource.jobManagerCpu'}), + key: `jobManagerCpu`, + renderText: (text: any, record: WsFlinkKubernetesJobInstance, index: number, action: ProCoreActionType) => { + return record.jobManager?.resource?.cpu + } + }, + { + title: intl.formatMessage({id: 'pages.project.flink.kubernetes.job.detail.deploy.resource.taskManagerCpu'}), + key: `taskManagerCpu`, + renderText: (text: any, record: WsFlinkKubernetesJobInstance, index: number, action: ProCoreActionType) => { + return record.taskManager?.resource?.cpu + } + }, + { + title: intl.formatMessage({id: 'pages.project.flink.kubernetes.job.detail.deploy.resource.jobManagerMemory'}), + key: `jobManagerMemory`, + renderText: (text: any, record: WsFlinkKubernetesJobInstance, index: number, action: ProCoreActionType) => { + return record.jobManager?.resource?.memory + } + }, + { + title: intl.formatMessage({id: 'pages.project.flink.kubernetes.job.detail.deploy.resource.taskManagerMemory'}), + key: `taskManagerMemory`, + renderText: (text: any, record: WsFlinkKubernetesJobInstance, index: number, action: ProCoreActionType) => { + return record.taskManager?.resource?.memory + } + }, + { + title: intl.formatMessage({id: 'pages.project.flink.kubernetes.job.detail.deploy.resource.jobManagerReplicas'}), + key: `jobManagerReplicas`, + renderText: (text: any, record: WsFlinkKubernetesJobInstance, index: number, action: ProCoreActionType) => { + return record.jobManager?.replicas + } + }, + { + title: intl.formatMessage({id: 'pages.project.flink.kubernetes.job.detail.deploy.resource.taskManagerReplicas'}), + key: `taskManagerReplicas`, + renderText: (text: any, record: WsFlinkKubernetesJobInstance, index: number, action: ProCoreActionType) => { + return record.taskManager?.replicas + } + }, + ] + + return ( + + ); +} + + +const mapModelToProps = ({flinkKubernetesJobDetail}: any) => ({flinkKubernetesJobDetail}) +export default connect(mapModelToProps)(FlinkKubernetesJobResourceWeb); diff --git a/scaleph-ui-react/src/pages/Project/Workspace/Engine/Compute/Flink/Job/Detail/Overview/index.tsx b/scaleph-ui-react/src/pages/Project/Workspace/Engine/Compute/Flink/Job/Detail/Overview/index.tsx new file mode 100644 index 000000000..0b8fff5b0 --- /dev/null +++ b/scaleph-ui-react/src/pages/Project/Workspace/Engine/Compute/Flink/Job/Detail/Overview/index.tsx @@ -0,0 +1,38 @@ +import React from "react"; +import {ProCard} from "@ant-design/pro-components"; +import {useIntl} from "@umijs/max"; +import ArtifactFlinkJarWeb + from "@/pages/Project/Workspace/Engine/Compute/Flink/Job/Detail/Overview/ArtifactFlinkJarWeb"; +import FlinkKubernetesJobResourceWeb + from "@/pages/Project/Workspace/Engine/Compute/Flink/Job/Detail/Overview/FlinkKubernetesJobResourceWeb"; +import FlinkKubernetesJobDetailConfigurationWeb + from "@/pages/Project/Workspace/Engine/Compute/Flink/Job/Detail/Overview/FlinkKubernetesJobConfiguration"; + +const FlinkKubernetesJobDetailOverviewWeb: React.FC = () => { + const intl = useIntl(); + + return ( + + + + + + + + + + + + ); +} + +export default FlinkKubernetesJobDetailOverviewWeb; diff --git a/scaleph-ui-react/src/pages/Project/Workspace/Engine/Compute/Flink/Job/Detail/YAML/FlinkKubernetesJobDetailDeployYaml.tsx b/scaleph-ui-react/src/pages/Project/Workspace/Engine/Compute/Flink/Job/Detail/YAML/FlinkKubernetesJobDetailDeployYaml.tsx new file mode 100644 index 000000000..dce5f183a --- /dev/null +++ b/scaleph-ui-react/src/pages/Project/Workspace/Engine/Compute/Flink/Job/Detail/YAML/FlinkKubernetesJobDetailDeployYaml.tsx @@ -0,0 +1,55 @@ +import React, {useEffect, useRef, useState} from "react"; +import {connect} from "@umijs/max"; +import Editor, {Monaco, useMonaco} from "@monaco-editor/react"; +import {Props} from '@/typings'; +import {WsFlinkKubernetesJob} from "@/services/project/typings"; +import {WsFlinkKubernetesJobService} from "@/services/project/WsFlinkKubernetesJobService"; + +const FlinkKubernetesJobDetailDeployYAMLWeb: React.FC> = (props: any) => { + + const editorRef = useRef(null); + const monaco = useMonaco(); + + const [job, setJob] = useState() + + useEffect(() => { + // do conditional chaining + monaco?.languages.typescript.javascriptDefaults.setEagerModelSync(true); + }, [monaco]); + + useEffect(() => { + if (props.flinkKubernetesJobDetail.job) { + WsFlinkKubernetesJobService.asYaml(props.flinkKubernetesJobDetail.job?.id).then((response) => { + if (response.success) { + setJob(response.data) + } + }) + } + }, [props.flinkKubernetesJobDetail.job]); + + const handleEditorDidMount = (editor, monaco: Monaco) => { + editorRef.current = editor; + } + + return ( + + ); +} + + +const mapModelToProps = ({flinkKubernetesJobDetail}: any) => ({flinkKubernetesJobDetail}) +export default connect(mapModelToProps)(FlinkKubernetesJobDetailDeployYAMLWeb); diff --git a/scaleph-ui-react/src/pages/Project/Workspace/Engine/Compute/Flink/Job/Detail/YAML/FlinkKubernetesJobDetailStatusYaml.tsx b/scaleph-ui-react/src/pages/Project/Workspace/Engine/Compute/Flink/Job/Detail/YAML/FlinkKubernetesJobDetailStatusYaml.tsx new file mode 100644 index 000000000..02fce1eda --- /dev/null +++ b/scaleph-ui-react/src/pages/Project/Workspace/Engine/Compute/Flink/Job/Detail/YAML/FlinkKubernetesJobDetailStatusYaml.tsx @@ -0,0 +1,55 @@ +import React, {useEffect, useRef, useState} from "react"; +import {connect} from "@umijs/max"; +import Editor, {Monaco, useMonaco} from "@monaco-editor/react"; +import {Props} from '@/typings'; +import {WsFlinkKubernetesJob} from "@/services/project/typings"; +import {WsFlinkKubernetesJobService} from "@/services/project/WsFlinkKubernetesJobService"; + +const FlinkKubernetesJobDetailStatusYAMLWeb: React.FC> = (props: any) => { + + const editorRef = useRef(null); + const monaco = useMonaco(); + + const [jobStatus, setJobStatus] = useState() + + useEffect(() => { + // do conditional chaining + monaco?.languages.typescript.javascriptDefaults.setEagerModelSync(true); + }, [monaco]); + + useEffect(() => { + if (props.flinkKubernetesJobDetail.job) { + WsFlinkKubernetesJobService.asYaml(props.flinkKubernetesJobDetail.job?.id).then((response) => { + if (response.success) { + setJobStatus(response.data) + } + }) + } + }, [props.flinkKubernetesJobDetail.job]); + + const handleEditorDidMount = (editor, monaco: Monaco) => { + editorRef.current = editor; + } + + return ( + + ); +} + + +const mapModelToProps = ({flinkKubernetesJobDetail}: any) => ({flinkKubernetesJobDetail}) +export default connect(mapModelToProps)(FlinkKubernetesJobDetailStatusYAMLWeb); diff --git a/scaleph-ui-react/src/pages/Project/Workspace/Engine/Compute/Flink/Job/Detail/YAML/index.tsx b/scaleph-ui-react/src/pages/Project/Workspace/Engine/Compute/Flink/Job/Detail/YAML/index.tsx index 2645e71af..c9f930b9b 100644 --- a/scaleph-ui-react/src/pages/Project/Workspace/Engine/Compute/Flink/Job/Detail/YAML/index.tsx +++ b/scaleph-ui-react/src/pages/Project/Workspace/Engine/Compute/Flink/Job/Detail/YAML/index.tsx @@ -1,52 +1,27 @@ -import React, {useEffect, useRef, useState} from "react"; -import {connect} from "@umijs/max"; -import Editor, {Monaco, useMonaco} from "@monaco-editor/react"; +import React from "react"; +import {Divider} from "antd"; +import {ProCard} from "@ant-design/pro-components"; +import {connect, useIntl} from "@umijs/max"; import {Props} from '@/typings'; import {WsFlinkKubernetesJob} from "@/services/project/typings"; -import {WsFlinkKubernetesJobService} from "@/services/project/WsFlinkKubernetesJobService"; +import FlinkKubernetesJobDetailDeployYAMLWeb + from "@/pages/Project/Workspace/Engine/Compute/Flink/Job/Detail/YAML/FlinkKubernetesJobDetailDeployYaml"; +import FlinkKubernetesJobDetailStatusYAMLWeb + from "@/pages/Project/Workspace/Engine/Compute/Flink/Job/Detail/YAML/FlinkKubernetesJobDetailStatusYaml"; const FlinkKubernetesJobDetailYAMLWeb: React.FC> = (props: any) => { - - const editorRef = useRef(null); - const monaco = useMonaco(); - - const [job, setJob] = useState() - - useEffect(() => { - // do conditional chaining - monaco?.languages.typescript.javascriptDefaults.setEagerModelSync(true); - }, [monaco]); - - useEffect(() => { - if (props.flinkKubernetesJobDetail.job) { - WsFlinkKubernetesJobService.asYaml(props.flinkKubernetesJobDetail.job?.id).then((response) => { - if (response.success) { - setJob(response.data) - } - }) - } - }, [props.flinkKubernetesJobDetail.job]); - - const handleEditorDidMount = (editor, monaco: Monaco) => { - editorRef.current = editor; - } + const intl = useIntl(); return ( - + + + + + + + + + ); } diff --git a/scaleph-ui-react/src/pages/Project/Workspace/Engine/Compute/Flink/Job/Detail/index.tsx b/scaleph-ui-react/src/pages/Project/Workspace/Engine/Compute/Flink/Job/Detail/index.tsx index 99b7abb60..7bd38f07d 100644 --- a/scaleph-ui-react/src/pages/Project/Workspace/Engine/Compute/Flink/Job/Detail/index.tsx +++ b/scaleph-ui-react/src/pages/Project/Workspace/Engine/Compute/Flink/Job/Detail/index.tsx @@ -2,16 +2,16 @@ import React, {useEffect, useState} from "react"; import {Button, message, Popconfirm, Tabs} from "antd"; import {ProCoreActionType} from "@ant-design/pro-utils/es/typing"; import { - AreaChartOutlined, - CameraOutlined, - CaretRightOutlined, - CloseOutlined, - DashboardOutlined, - OrderedListOutlined, - RedoOutlined + AreaChartOutlined, + CameraOutlined, + CaretRightOutlined, + CloseOutlined, + DashboardOutlined, + OrderedListOutlined, + RedoOutlined } from "@ant-design/icons"; import {ProDescriptionsItemProps} from "@ant-design/pro-descriptions"; -import {PageContainer, ProDescriptions} from "@ant-design/pro-components"; +import {PageContainer, ProCard, ProDescriptions} from "@ant-design/pro-components"; import {connect, useAccess, useIntl, useLocation} from "@umijs/max"; import {WsFlinkKubernetesJob} from "@/services/project/typings"; import FlinkKubernetesJobDetailYAMLWeb from "@/pages/Project/Workspace/Engine/Compute/Flink/Job/Detail/YAML"; @@ -19,235 +19,248 @@ import {WsFlinkKubernetesJobService} from "@/services/project/WsFlinkKubernetesJ import FlinkKubernetesJobDeployForm from "@/pages/Project/Workspace/Engine/Compute/Flink/Job/Detail/JobDeployForm"; import FlinkKubernetesJobShutdownForm from "@/pages/Project/Workspace/Engine/Compute/Flink/Job/Detail/JobShutdownForm"; import FlinkKubernetesJobDetailInstanceListWeb - from "@/pages/Project/Workspace/Engine/Compute/Flink/Job/Detail/InstanceList"; + from "@/pages/Project/Workspace/Engine/Compute/Flink/Job/Detail/InstanceList"; import FlinkKubernetesJobDetailSavepointWeb from "@/pages/Project/Workspace/Engine/Compute/Flink/Job/Detail/Savepoint"; +import FlinkKubernetesJobDetailOverviewWeb from "@/pages/Project/Workspace/Engine/Compute/Flink/Job/Detail/Overview"; const FlinkKubernetesJobDetailWeb: React.FC = (props: any) => { - const intl = useIntl(); - const access = useAccess(); - const urlParams = useLocation() - const [jobDeployFormData, setJobDeployFormData] = useState<{ - visiable: boolean; - data: WsFlinkKubernetesJob; - }>({visiable: false, data: {}}); - const [jobShutdownFormData, setJobShutdownFormData] = useState<{ - visiable: boolean; - data: WsFlinkKubernetesJob; - }>({visiable: false, data: {}}); + const intl = useIntl(); + const access = useAccess(); + const urlParams = useLocation() + const [jobDeployFormData, setJobDeployFormData] = useState<{ + visiable: boolean; + data: WsFlinkKubernetesJob; + }>({visiable: false, data: {}}); + const [jobShutdownFormData, setJobShutdownFormData] = useState<{ + visiable: boolean; + data: WsFlinkKubernetesJob; + }>({visiable: false, data: {}}); - useEffect(() => { - const data = urlParams.state as WsFlinkKubernetesJob - refreshJob(data.id) - let timer = setInterval(() => { - refreshJob(data.id) - }, 3000); - return () => { - clearInterval(timer); - }; - }, []); + useEffect(() => { + const data = urlParams.state as WsFlinkKubernetesJob + refreshJob(data.id) + let timer = setInterval(() => { + refreshJob(data.id) + }, 3000); + return () => { + clearInterval(timer); + }; + }, []); - const refreshJob = (id: number | undefined) => { - props.dispatch({ - type: 'flinkKubernetesJobDetail/queryJob', - payload: id - }) - } + const refreshJob = (id: number | undefined) => { + props.dispatch({ + type: 'flinkKubernetesJobDetail/queryJob', + payload: id + }) + } - const descriptionColumns: ProDescriptionsItemProps[] = [ - { - title: intl.formatMessage({id: 'pages.project.flink.kubernetes.job.name'}), - key: `name`, - dataIndex: 'name', - }, - { - title: intl.formatMessage({id: 'pages.project.flink.kubernetes.job.executionMode'}), - key: `executionMode`, - renderText: (text: any, record: WsFlinkKubernetesJob, index: number, action: ProCoreActionType) => { - return record.executionMode?.label - } - }, - { - title: intl.formatMessage({id: 'pages.project.flink.kubernetes.job.deploymentKind'}), - key: `deploymentKind`, - renderText: (text: any, record: WsFlinkKubernetesJob, index: number, action: ProCoreActionType) => { - return record.deploymentKind?.label - } - }, - { - title: intl.formatMessage({id: 'pages.project.flink.kubernetes.job.type'}), - key: `type`, - renderText: (text: any, record: WsFlinkKubernetesJob, index: number, action: ProCoreActionType) => { - return record.type?.label - } - }, - { - title: intl.formatMessage({id: 'app.common.data.remark'}), - key: `remark`, - dataIndex: 'remark', - }, - { - title: intl.formatMessage({id: 'app.common.data.createTime'}), - key: `createTime`, - dataIndex: 'createTime', - }, - { - title: intl.formatMessage({id: 'app.common.data.updateTime'}), - key: `updateTime`, - dataIndex: 'updateTime', - }, - { - title: '操作', - valueType: 'option', - render: () => [ -
- -
, - -
- - - { - WsFlinkKubernetesJobService.restart(props.flinkKubernetesJobDetail.job.jobInstance.id).then(response => { - if (response.success) { - message.success(intl.formatMessage({id: 'app.common.operate.submit.success'})); - } - }) - }} - > - - + const descriptionColumns: ProDescriptionsItemProps[] = [ + { + title: intl.formatMessage({id: 'pages.project.flink.kubernetes.job.name'}), + key: `name`, + dataIndex: 'name', + }, + { + title: intl.formatMessage({id: 'pages.project.flink.kubernetes.job.executionMode'}), + key: `executionMode`, + renderText: (text: any, record: WsFlinkKubernetesJob, index: number, action: ProCoreActionType) => { + return record.executionMode?.label + } + }, + { + title: intl.formatMessage({id: 'pages.project.flink.kubernetes.job.deploymentKind'}), + key: `deploymentKind`, + renderText: (text: any, record: WsFlinkKubernetesJob, index: number, action: ProCoreActionType) => { + return record.deploymentKind?.label + } + }, + { + title: intl.formatMessage({id: 'pages.project.flink.kubernetes.job.type'}), + key: `type`, + renderText: (text: any, record: WsFlinkKubernetesJob, index: number, action: ProCoreActionType) => { + return record.type?.label + } + }, + { + title: intl.formatMessage({id: 'app.common.data.remark'}), + key: `remark`, + dataIndex: 'remark', + }, + { + title: intl.formatMessage({id: 'app.common.data.createTime'}), + key: `createTime`, + dataIndex: 'createTime', + }, + { + title: intl.formatMessage({id: 'app.common.data.updateTime'}), + key: `updateTime`, + dataIndex: 'updateTime', + }, + { + title: intl.formatMessage({id: 'app.common.operate.label'}), + valueType: 'option', + render: () => [ +
+ +
, - -
, +
+ -
- { - WsFlinkKubernetesJobService.triggerSavepoint(props.flinkKubernetesJobDetail.job.jobInstance.id).then(response => { - if (response.success) { - message.success(intl.formatMessage({id: 'app.common.operate.submit.success'})); - } - }) - }} - > - - -
, + { + WsFlinkKubernetesJobService.restart(props.flinkKubernetesJobDetail.job.jobInstance.id).then(response => { + if (response.success) { + message.success(intl.formatMessage({id: 'app.common.operate.submit.success'})); + } + }) + }} + > + + -
- - - -
- ], - }, - ] + +
, - const items = [ - { - label: intl.formatMessage({id: 'pages.project.flink.kubernetes.job.detail.yaml'}), - key: 'yaml', - children: - }, - { - label: intl.formatMessage({id: 'pages.project.flink.kubernetes.job.detail.instanceList'}), - key: 'instanceList', - children: - }, - { - label: intl.formatMessage({id: 'pages.project.flink.kubernetes.job.detail.savepoint'}), - key: 'savepoint', - children: - }, - ] - return (
- - - - - {jobDeployFormData.visiable && ( - { - setJobDeployFormData({visiable: false, data: {}}); - }} - onVisibleChange={(visiable) => { - setJobDeployFormData({visiable: visiable, data: {}}); - }} - data={jobDeployFormData.data} - /> - )} + { + WsFlinkKubernetesJobService.triggerSavepoint(props.flinkKubernetesJobDetail.job.jobInstance.id).then(response => { + if (response.success) { + message.success(intl.formatMessage({id: 'app.common.operate.submit.success'})); + } + }) + }} + > + + +
, - {jobShutdownFormData.visiable && ( - { - setJobShutdownFormData({visiable: false, data: {}}); - }} - onVisibleChange={(visiable) => { - setJobShutdownFormData({visiable: visiable, data: {}}); - }} - data={jobShutdownFormData.data} - /> - )} +
+ + +
- ); + ], + }, + ] + + const items = [ + { + label: intl.formatMessage({id: 'pages.project.flink.kubernetes.job.detail.overview'}), + key: 'overview', + children: + }, + { + label: intl.formatMessage({id: 'pages.project.flink.kubernetes.job.detail.savepoint'}), + key: 'savepoint', + children: + }, + { + label: intl.formatMessage({id: 'pages.project.flink.kubernetes.job.detail.yaml'}), + key: 'yaml', + children: + }, + { + label: intl.formatMessage({id: 'pages.project.flink.kubernetes.job.detail.instanceList'}), + key: 'instanceList', + children: + }, + ] + return ( +
+ + + + + + + + + + + {jobDeployFormData.visiable && ( + { + setJobDeployFormData({visiable: false, data: {}}); + }} + onVisibleChange={(visiable) => { + setJobDeployFormData({visiable: visiable, data: {}}); + }} + data={jobDeployFormData.data} + /> + )} + + {jobShutdownFormData.visiable && ( + { + setJobShutdownFormData({visiable: false, data: {}}); + }} + onVisibleChange={(visiable) => { + setJobShutdownFormData({visiable: visiable, data: {}}); + }} + data={jobShutdownFormData.data} + /> + )} +
+ ); } const mapModelToProps = ({flinkKubernetesJobDetail}: any) => ({flinkKubernetesJobDetail}) diff --git a/scaleph-ui-react/src/pages/Project/Workspace/Engine/Compute/Flink/Job/index.tsx b/scaleph-ui-react/src/pages/Project/Workspace/Engine/Compute/Flink/Job/index.tsx index 29d910f1b..82eca92ac 100644 --- a/scaleph-ui-react/src/pages/Project/Workspace/Engine/Compute/Flink/Job/index.tsx +++ b/scaleph-ui-react/src/pages/Project/Workspace/Engine/Compute/Flink/Job/index.tsx @@ -167,7 +167,7 @@ const FlinkKubernetesJobWeb: React.FC = () => { type="link" icon={} onClick={() => { - history.push("/workspace/engine/compute/flink/job/detail", record) + history.push("/workspace/operation/compute/flink/job/detail", record) }} /> diff --git a/scaleph-ui-react/src/services/project/WsFlinkKubernetesJobService.ts b/scaleph-ui-react/src/services/project/WsFlinkKubernetesJobService.ts index 767e36c34..96c48f96d 100644 --- a/scaleph-ui-react/src/services/project/WsFlinkKubernetesJobService.ts +++ b/scaleph-ui-react/src/services/project/WsFlinkKubernetesJobService.ts @@ -37,7 +37,7 @@ export const WsFlinkKubernetesJobService = { }, asYaml: async (id: number) => { - return request>>(`${WsFlinkKubernetesJobService.url}/asYaml/` + id, { + return request>(`${WsFlinkKubernetesJobService.url}/asYaml/` + id, { method: 'GET', }); }, @@ -134,6 +134,13 @@ export const WsFlinkKubernetesJobService = { }); }, + getCurrentInstance: async (queryParam: WsFlinkKubernetesJobInstanceParam) => { + return request>(`${WsFlinkKubernetesJobService.url}/instances/current`, { + method: 'GET', + params: queryParam, + }); + }, + listSavepoints: async (queryParam: WsFlinkKubernetesJobInstanceSavepointParam) => { return request>(`${WsFlinkKubernetesJobService.url}/instances/savepoint`, { method: 'GET', diff --git a/scaleph-ui-react/src/services/project/typings.d.ts b/scaleph-ui-react/src/services/project/typings.d.ts index ace5303d0..8fe13ae8c 100644 --- a/scaleph-ui-react/src/services/project/typings.d.ts +++ b/scaleph-ui-react/src/services/project/typings.d.ts @@ -499,6 +499,7 @@ export type WsFlinkKubernetesJobInstance = { jobManager?: Record; taskManager?: Record; userFlinkConfiguration?: Record; + mergedFlinkConfiguration?: Record; state: Dict; jobState?: Dict; error?: Dict; diff --git a/tools/docker/mysql/init.d/scaleph-ws-mysql.sql b/tools/docker/mysql/init.d/scaleph-ws-mysql.sql index 95bee9350..fb307ebc8 100644 --- a/tools/docker/mysql/init.d/scaleph-ws-mysql.sql +++ b/tools/docker/mysql/init.d/scaleph-ws-mysql.sql @@ -93,7 +93,7 @@ create table ws_artifact_flink_sql INSERT INTO `ws_artifact_flink_sql` (`id`, `artifact_id`, `flink_version`, `script`, `current`, `creator`, `editor`) VALUES (1, 1, '1.18.0', - 'CREATE TEMPORARY TABLE source_table (\n `id` bigint,\n `name` string,\n `age` int,\n `address` string,\n `create_time`TIMESTAMP(3),\n `update_time`TIMESTAMP(3),\n WATERMARK FOR `update_time` AS update_time - INTERVAL \'1\' MINUTE -- sql editor 这里直接运行正确,在 flink kubernetes -> job 部署的时候异常\n)\nCOMMENT \'\'\nWITH (\n \'connector\' = \'datagen\',\n \'number-of-rows\' = \'100\'\n);\n\nCREATE TEMPORARY TABLE `sink_table` (\n `id` BIGINT,\n `name` VARCHAR(2147483647),\n `age` INT,\n `address` VARCHAR(2147483647),\n `create_time` TIMESTAMP(3),\n `update_time` TIMESTAMP(3)\n)\nCOMMENT \'\'\nWITH (\n \'connector\' = \'print\'\n);\n\ninsert into sink_table\nselect id, name, age, address, create_time, update_time from source_table;', + 'CREATE TEMPORARY TABLE source_table (\n `id` bigint,\n `name` string,\n `age` int,\n `address` string,\n `create_time`TIMESTAMP(3),\n `update_time`TIMESTAMP(3),\n WATERMARK FOR `update_time` AS update_time - INTERVAL \'1\' MINUTE -- sql editor 这里直接运行正确,在 flink kubernetes -> job 部署的时候异常\n)\nCOMMENT \'\'\nWITH (\n \' connector\' = \'datagen\',\n \'number-of-rows\' = \'100\'\n);\n\nCREATE TEMPORARY TABLE `sink_table` (\n `id` BIGINT,\n `name` VARCHAR(2147483647),\n `age` INT,\n `address` VARCHAR(2147483647),\n `create_time` TIMESTAMP(3),\n `update_time` TIMESTAMP(3)\n)\nCOMMENT \'\'\nWITH (\n \'connector\' = \'print\'\n);\n\ninsert into sink_table\nselect id, name, age, address, create_time, update_time from source_table;', '1', 'sys', 'sys'); INSERT INTO `ws_artifact_flink_sql` (`id`, `artifact_id`, `flink_version`, `script`, `current`, `creator`, `editor`) VALUES (2, 2, '1.18.0', @@ -365,6 +365,7 @@ CREATE TABLE ws_flink_kubernetes_job_instance job_manager text, task_manager text, user_flink_configuration text, + merged_flink_configuration text, state varchar(64), job_state varchar(64), error text,