├── .gitignore
├── README.md
├── pom.xml
└── src
└── main
├── java
└── com
│ └── github
│ └── codingdebugallday
│ └── client
│ ├── api
│ ├── controller
│ │ └── v1
│ │ │ ├── ClusterController.java
│ │ │ └── UploadJarController.java
│ └── dto
│ │ ├── ClusterDTO.java
│ │ ├── GroupDTO.java
│ │ ├── NodeDTO.java
│ │ ├── NodeSettingInfo.java
│ │ └── UploadJarDTO.java
│ ├── app
│ └── service
│ │ ├── ApiClient.java
│ │ ├── ClusterService.java
│ │ ├── FlinkApi.java
│ │ ├── FlinkCommonService.java
│ │ ├── UploadJarService.java
│ │ ├── impl
│ │ ├── ClusterServiceImpl.java
│ │ └── UploadJarServiceImpl.java
│ │ ├── jars
│ │ └── FlinkJarService.java
│ │ ├── jm
│ │ └── FlinkJobManagerService.java
│ │ ├── jobs
│ │ └── FlinkJobService.java
│ │ ├── overview
│ │ └── ClusterOverviewService.java
│ │ └── tm
│ │ └── FlinkTaskManagerService.java
│ ├── domain
│ ├── entity
│ │ ├── ApiResult.java
│ │ ├── Cluster.java
│ │ ├── Node.java
│ │ ├── UploadJar.java
│ │ ├── jars
│ │ │ ├── JarRunRequest.java
│ │ │ ├── JarRunResponseBody.java
│ │ │ └── JarUploadResponseBody.java
│ │ ├── jobs
│ │ │ ├── FlinkApiErrorResponse.java
│ │ │ ├── JobDetailsInfo.java
│ │ │ ├── JobExceptionsInfo.java
│ │ │ ├── JobIdsWithStatusOverview.java
│ │ │ ├── MultipleJobsDetails.java
│ │ │ ├── SavepointInfo.java
│ │ │ ├── SavepointTriggerRequestBody.java
│ │ │ ├── TriggerResponse.java
│ │ │ └── TriggerResponseWithSavepoint.java
│ │ ├── overview
│ │ │ └── DashboardConfiguration.java
│ │ └── tm
│ │ │ ├── TaskManagerDetail.java
│ │ │ └── TaskManagerInfo.java
│ └── repository
│ │ ├── ClusterRepository.java
│ │ ├── NodeRepository.java
│ │ └── UploadJarRepository.java
│ └── infra
│ ├── autoconfigure
│ ├── FlinkApiAutoConfiguration.java
│ ├── GlobalExceptionHandlerAutoConfiguration.java
│ └── MybatisPlusConfig.java
│ ├── constants
│ └── FlinkApiConstant.java
│ ├── context
│ └── FlinkApiContext.java
│ ├── converter
│ ├── ClusterConvertMapper.java
│ ├── ClusterConvertUtil.java
│ ├── NodeConvertMapper.java
│ └── UploadJarConvertMapper.java
│ ├── enums
│ └── NodeTypeEnum.java
│ ├── exceptions
│ ├── FlinkApiCommonException.java
│ ├── FlinkCommonException.java
│ ├── GlobalExceptionHandler.java
│ ├── RestTemplateErrorHandler.java
│ └── package-info.java
│ ├── handlers
│ └── FutureTaskWorker.java
│ ├── mapper
│ ├── ClusterMapper.java
│ ├── NodeMapper.java
│ └── UploadJarMapper.java
│ ├── repository
│ └── impl
│ │ ├── ClusterRepositoryImpl.java
│ │ ├── NodeRepositoryImpl.java
│ │ └── UploadJarRepositoryImpl.java
│ └── utils
│ ├── ApplicationContextHelper.java
│ ├── FlinkApiUtil.java
│ ├── FlinkCommonUtil.java
│ ├── JSON.java
│ ├── Preconditions.java
│ ├── RestTemplateUtil.java
│ ├── RetryUtil.java
│ └── ThreadPoolUtil.java
└── resources
├── META-INF
└── spring.factories
├── application.yml
├── mapper
├── ClusterMapper.xml
├── NodeMapper.xml
└── UploadJarMapper.xml
└── sql
└── flink_explore_1.0.2.sql
/.gitignore:
--------------------------------------------------------------------------------
1 | # Created by .ignore support plugin (hsz.mobi)
2 | ### Java template
3 | # Compiled class file
4 | *.class
5 |
6 | # Log file
7 | *.log
8 |
9 | # BlueJ files
10 | *.ctxt
11 |
12 | # Mobile Tools for Java (J2ME)
13 | .mtj.tmp/
14 |
15 | # Package Files #
16 | *.jar
17 | *.war
18 | *.nar
19 | *.ear
20 | *.zip
21 | *.tar.gz
22 | *.rar
23 |
24 | # virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
25 | hs_err_pid*
26 |
27 | ### Maven template
28 | target/
29 | pom.xml.tag
30 | pom.xml.releaseBackup
31 | pom.xml.versionsBackup
32 | pom.xml.next
33 | release.properties
34 | dependency-reduced-pom.xml
35 | buildNumber.properties
36 | .mvn/timing.properties
37 | # https://github.com/takari/maven-wrapper#usage-without-binary-jar
38 | .mvn/wrapper/maven-wrapper.jar
39 |
40 | ### Gradle template
41 | .gradle
42 | /build/
43 |
44 | # Ignore Gradle GUI config
45 | gradle-app.setting
46 |
47 | # Avoid ignoring Gradle wrapper jar file (.jar files are usually ignored)
48 | !gradle-wrapper.jar
49 |
50 | # Cache of project
51 | .gradletasknamecache
52 |
53 | # # Work around https://youtrack.jetbrains.com/issue/IDEA-116898
54 | # gradle/wrapper/gradle-wrapper.properties
55 |
56 | ### SVN template
57 | .svn/
58 |
59 | ### Eclipse template
60 | .metadata
61 | bin/
62 | tmp/
63 | *.tmp
64 | *.bak
65 | *.swp
66 | *~.nib
67 | local.properties
68 | .settings/
69 | .loadpath
70 | .recommenders
71 |
72 | # External tool builders
73 | .externalToolBuilders/
74 |
75 | # Locally stored "Eclipse launch configurations"
76 | *.launch
77 |
78 | # PyDev specific (Python IDE for Eclipse)
79 | *.pydevproject
80 |
81 | # CDT-specific (C/C++ Development Tooling)
82 | .cproject
83 |
84 | # CDT- autotools
85 | .autotools
86 |
87 | # Java annotation processor (APT)
88 | .factorypath
89 |
90 | # PDT-specific (PHP Development Tools)
91 | .buildpath
92 |
93 | # sbteclipse plugin
94 | .target
95 |
96 | # Tern plugin
97 | .tern-project
98 |
99 | # TeXlipse plugin
100 | .texlipse
101 |
102 | # STS (Spring Tool Suite)
103 | .springBeans
104 |
105 | # Code Recommenders
106 | .recommenders/
107 |
108 | # Annotation Processing
109 | .apt_generated/
110 | .apt_generated_test/
111 |
112 | # Scala IDE specific (Scala & Java development for Eclipse)
113 | .cache-main
114 | .scala_dependencies
115 | .worksheet
116 |
117 | ### Redis template
118 | # Ignore redis binary dump (dump.rdb) files
119 |
120 | *.rdb
121 |
122 | ### macOS template
123 | # General
124 | .DS_Store
125 | .AppleDouble
126 | .LSOverride
127 |
128 | # Icon must end with two \r
129 | Icon
130 |
131 | # Thumbnails
132 | ._*
133 |
134 | # Files that might appear in the root of a volume
135 | .DocumentRevisions-V100
136 | .fseventsd
137 | .Spotlight-V100
138 | .TemporaryItems
139 | .Trashes
140 | .VolumeIcon.icns
141 | .com.apple.timemachine.donotpresent
142 |
143 | # Directories potentially created on remote AFP share
144 | .AppleDB
145 | .AppleDesktop
146 | Network Trash Folder
147 | Temporary Items
148 | .apdisk
149 |
150 | ### Example user template template
151 | ### Example user template
152 |
153 | # IntelliJ project files
154 | .idea
155 | *.iml
156 | out
157 | gen
158 | ### Windows template
159 | # Windows thumbnail cache files
160 | Thumbs.db
161 | Thumbs.db:encryptable
162 | ehthumbs.db
163 | ehthumbs_vista.db
164 |
165 | # Dump file
166 | *.stackdump
167 |
168 | # Folder config file
169 | [Dd]esktop.ini
170 |
171 | # Recycle Bin used on file shares
172 | $RECYCLE.BIN/
173 |
174 | # Windows Installer files
175 | *.cab
176 | *.msi
177 | *.msix
178 | *.msm
179 | *.msp
180 |
181 | # Windows shortcuts
182 | *.lnk
183 |
184 | ### JetBrains template
185 | # Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and WebStorm
186 | # Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
187 |
188 | # User-specific stuff
189 | .idea/**/workspace.xml
190 | .idea/**/tasks.xml
191 | .idea/**/usage.statistics.xml
192 | .idea/**/dictionaries
193 | .idea/**/shelf
194 |
195 | # Generated files
196 | .idea/**/contentModel.xml
197 |
198 | # Sensitive or high-churn files
199 | .idea/**/dataSources/
200 | .idea/**/dataSources.ids
201 | .idea/**/dataSources.local.xml
202 | .idea/**/sqlDataSources.xml
203 | .idea/**/dynamic.xml
204 | .idea/**/uiDesigner.xml
205 | .idea/**/dbnavigator.xml
206 |
207 | # Gradle
208 | .idea/**/gradle.xml
209 | .idea/**/libraries
210 |
211 | # Gradle and Maven with auto-import
212 | # When using Gradle or Maven with auto-import, you should exclude module files,
213 | # since they will be recreated, and may cause churn. Uncomment if using
214 | # auto-import.
215 | # .idea/artifacts
216 | # .idea/compiler.xml
217 | # .idea/modules.xml
218 | # .idea/*.iml
219 | # .idea/modules
220 | # *.iml
221 | # *.ipr
222 |
223 | # CMake
224 | cmake-build-*/
225 |
226 | # Mongo Explorer plugin
227 | .idea/**/mongoSettings.xml
228 |
229 | # File-based project format
230 | *.iws
231 |
232 | # IntelliJ
233 | out/
234 |
235 | # mpeltonen/sbt-idea plugin
236 | .idea_modules/
237 |
238 | # JIRA plugin
239 | atlassian-ide-plugin.xml
240 |
241 | # Cursive Clojure plugin
242 | .idea/replstate.xml
243 |
244 | # Crashlytics plugin (for Android Studio and IntelliJ)
245 | com_crashlytics_export_strings.xml
246 | crashlytics.properties
247 | crashlytics-build.properties
248 | fabric.properties
249 |
250 | # Editor-based Rest Client
251 | .idea/httpRequests
252 |
253 | # Android studio 3.1+ serialized cache file
254 | .idea/caches/build_file_checksums.ser
255 |
256 | src/main/java/com/github/codingdebugallday/client/*Application.java
257 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # flink-api-spring-boot-starter
2 |
3 | - ### 基于flink rest api开发的spring boot starter,可上传/运行jar等一系列操作
4 |
5 | # Quick Start
6 |
7 | 1. 执行```src/main/resources/sql/flink_explore.sql```
8 | 2. jar已发布到中仓仓库,直接依赖即可
9 | ```pom
10 |
11 | com.github.codingdebugallday
12 | flink-api-spring-boot-starter
13 | 1.0.3.RELEASE
14 |
15 | ```
16 | 3. spring boot配置文件如示例,```src/main/resources/application.yml```
17 | 4. 创建自己的flink集群, 已内置```com/github/codingdebugallday/client/api/controller/v1/ClusterController.java```许多接口
18 | > url: http://localhost:9527/v1/{tenantId}/cluster
19 |
20 | > method: post
21 | ```json
22 | {
23 | "clusterCode": "hdspdev",
24 | "clusterDesc": "hdspdev",
25 | "jobManagerUrl": "http://hdspdev002:50100",
26 | "username": "root",
27 | "password": "m8rW2EQ0iDCcWlbH",
28 | "jobManagerStandbyUrl": "http://hdspdev001:50100",
29 | "enabledFlag": 1,
30 | "tenantId": 0,
31 | "nodeDTOList": [
32 | {
33 | "nodeCode": "flink_hdspdev001",
34 | "nodeDesc": "hdspdev001",
35 | "nodeType":"MARSTER",
36 | "settingInfo": "{\"host\":\"hdspdev001\",\"username\":\"root\",\"password\":\"m8rW2EQ0iDCcWlbH\"}"
37 | },
38 | {
39 | "nodeCode": "flink_hdspdev002",
40 | "nodeDesc": "hdspdev002",
41 | "nodeType":"SLAVE",
42 | "settingInfo": "{\"host\":\"hdspdev002\",\"username\":\"root\",\"password\":\"m8rW2EQ0iDCcWlbH\"}"
43 | },
44 | {
45 | "nodeCode": "flink_hdspdev003",
46 | "nodeDesc": "hdspdev003",
47 | "nodeType":"SLAVE",
48 | "settingInfo": "{\"host\":\"hdspdev003\",\"username\":\"root\",\"password\":\"m8rW2EQ0iDCcWlbH\"}"
49 | },
50 | {
51 | "nodeCode": "flink_hdspdev004",
52 | "nodeDesc": "hdspdev004",
53 | "nodeType":"SLAVE",
54 | "settingInfo": "{\"host\":\"hdspdev004\",\"username\":\"root\",\"password\":\"m8rW2EQ0iDCcWlbH\"}"
55 | },
56 | {
57 | "nodeCode": "flink_hdspdev005",
58 | "nodeDesc": "hdspdev005",
59 | "nodeType":"SLAVE",
60 | "settingInfo": "{\"host\":\"hdspdev005\",\"username\":\"root\",\"password\":\"m8rW2EQ0iDCcWlbH\"}"
61 | },
62 | {
63 | "nodeCode": "flink_hdspdev006",
64 | "nodeDesc": "hdspdev006",
65 | "nodeType":"SLAVE",
66 | "settingInfo": "{\"host\":\"hdspdev006\",\"username\":\"root\",\"password\":\"m8rW2EQ0iDCcWlbH\"}"
67 | }
68 | ]
69 | }
70 | ```
71 | 4. 使用
72 | > 首先获取FlinkApiContext,然后通过clusterCode以及tenantId获取flinkApi,
73 | >flinkApi即可调用api,如uploadJar/runJar/jobList等
74 | >
75 | > 会自动重试3次,如jm master挂了,会切换到备用节点进行访问
76 |
77 | ```java
78 | @Autowired
79 | private FlinkApiContext flinkApiContext;
80 |
81 | FlinkApi flinkApi = flinkApiContext.get(clusterCode, tenantId);
82 | flinkApi.uploadJar(file)
83 | ```
84 |
--------------------------------------------------------------------------------
/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 | 4.0.0
6 |
7 | com.github.codingdebugallday
8 | flink-api-spring-boot-starter
9 | 1.0.4.RELEASE
10 |
11 |
12 | org.springframework.boot
13 | spring-boot-starter-parent
14 | 2.2.4.RELEASE
15 |
16 |
17 |
18 |
19 | UTF-8
20 | 1.8
21 | 1.8
22 | 2.1.2
23 | 3.3.1
24 | 3.0.0
25 | 1.3.1.Final
26 | 1.18.12
27 | 1.10.0
28 |
29 |
30 | flink-api-spring-boot-starter
31 | https://github.com/codingdebugallday/flink-api-spring-boot-starter
32 | flink api for spring boot
33 |
34 |
35 |
36 | The Apache Software License, Version 2.0
37 | http://www.apache.org/licenses/LICENSE-2.0.txt
38 | repo
39 |
40 |
41 |
42 |
43 | https://github.com/codingdebugallday/flink-api-spring-boot-starter
44 | https://github.com/codingdebugallday/flink-api-spring-boot-starter.git
45 | https://github.com/codingdebugallday/flink-api-spring-boot-starter.git
46 |
47 |
48 |
49 |
50 |
51 | abigballofmud
52 | codingdebugallday@163.com
53 |
54 | Developer
55 |
56 | +8
57 |
58 |
59 |
60 |
61 |
62 | com.google.guava
63 | guava
64 | 28.2-jre
65 |
66 |
67 | org.projectlombok
68 | lombok
69 | ${lombok.version}
70 | true
71 |
72 |
73 |
74 | com.github.ulisesbocchio
75 | jasypt-spring-boot-starter
76 | 3.0.2
77 |
78 |
79 | org.springframework.boot
80 | spring-boot-autoconfigure
81 |
82 |
83 | org.springframework.boot
84 | spring-boot-configuration-processor
85 | true
86 |
87 |
88 | com.vaadin.external.google
89 | android-json
90 |
91 |
92 |
93 |
94 | org.springframework.boot
95 | spring-boot-starter-jdbc
96 |
97 |
98 | com.baomidou
99 | mybatis-plus-boot-starter
100 | ${mybatis.plus.version}
101 |
102 |
103 | org.mybatis.spring.boot
104 | mybatis-spring-boot-starter
105 | ${mybatis.spring.starter.version}
106 |
107 |
108 | com.baomidou
109 | dynamic-datasource-spring-boot-starter
110 | ${dynamic.datasource.boot.version}
111 |
112 |
113 | org.springframework.boot
114 | spring-boot-starter-aop
115 |
116 |
117 | org.springframework.boot
118 | spring-boot-starter-web
119 |
120 |
121 | org.springframework.boot
122 | spring-boot-starter-test
123 | test
124 |
125 |
126 | org.junit.vintage
127 | junit-vintage-engine
128 |
129 |
130 |
131 |
132 |
133 | mysql
134 | mysql-connector-java
135 | 5.1.48
136 |
137 |
138 |
139 | javax.persistence
140 | persistence-api
141 | 1.0.2
142 |
143 |
144 | org.mapstruct
145 | mapstruct
146 | ${org.mapstruct.version}
147 |
148 |
149 | com.alibaba
150 | transmittable-thread-local
151 | 2.11.0
152 |
153 |
154 | org.apache.httpcomponents
155 | httpclient
156 |
157 |
158 |
159 |
160 |
161 |
162 |
163 |
164 | ossrh
165 | https://oss.sonatype.org/content/repositories/snapshots
166 |
167 |
168 | ossrh
169 | https://oss.sonatype.org/service/local/staging/deploy/maven2/
170 |
171 |
172 |
173 |
174 |
175 |
176 | com.github.ulisesbocchio
177 | jasypt-maven-plugin
178 | 3.0.2
179 |
180 |
181 |
182 | org.apache.maven.plugins
183 | maven-javadoc-plugin
184 | 3.2.0
185 |
186 | UTF-8
187 | UTF-8
188 | UTF-8
189 |
190 |
191 |
192 | attach-javadocs
193 |
194 | jar
195 |
196 |
197 | -Xdoclint:none
198 |
199 |
200 |
201 |
202 |
203 |
204 | org.apache.maven.plugins
205 | maven-source-plugin
206 | 3.2.1
207 |
208 |
209 | attach-sources
210 |
211 | jar-no-fork
212 |
213 |
214 |
215 |
216 |
217 |
218 | org.apache.maven.plugins
219 | maven-compiler-plugin
220 | 3.8.1
221 |
222 | 1.8
223 | 1.8
224 | UTF-8
225 |
226 |
227 | org.mapstruct
228 | mapstruct-processor
229 | ${org.mapstruct.version}
230 |
231 |
232 |
233 | org.projectlombok
234 | lombok
235 | ${lombok.version}
236 |
237 |
238 |
239 |
240 |
241 |
242 | org.apache.maven.plugins
243 | maven-gpg-plugin
244 | 1.6
245 |
246 |
247 | sign-artifacts
248 | verify
249 |
250 | sign
251 |
252 |
253 |
254 |
255 |
256 |
257 | org.sonatype.plugins
258 | nexus-staging-maven-plugin
259 | 1.6.8
260 | true
261 |
262 | ossrh
263 | https://oss.sonatype.org/
264 | true
265 |
266 |
267 |
268 |
269 | org.apache.maven.plugins
270 | maven-release-plugin
271 | 2.5.3
272 |
273 |
274 |
275 |
276 |
--------------------------------------------------------------------------------
/src/main/java/com/github/codingdebugallday/client/api/controller/v1/ClusterController.java:
--------------------------------------------------------------------------------
1 | package com.github.codingdebugallday.client.api.controller.v1;
2 |
3 | import java.util.List;
4 | import java.util.Map;
5 | import javax.validation.Valid;
6 |
7 | import com.baomidou.mybatisplus.core.metadata.IPage;
8 | import com.baomidou.mybatisplus.core.metadata.OrderItem;
9 | import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
10 | import com.github.codingdebugallday.client.api.dto.ClusterDTO;
11 | import com.github.codingdebugallday.client.app.service.ClusterService;
12 | import com.github.codingdebugallday.client.domain.entity.Cluster;
13 | import com.github.codingdebugallday.client.domain.entity.jobs.*;
14 | import com.github.codingdebugallday.client.domain.entity.overview.DashboardConfiguration;
15 | import com.github.codingdebugallday.client.domain.entity.tm.TaskManagerDetail;
16 | import com.github.codingdebugallday.client.domain.entity.tm.TaskManagerInfo;
17 | import com.github.codingdebugallday.client.domain.repository.ClusterRepository;
18 | import org.springframework.web.bind.annotation.*;
19 |
20 | /**
21 | *
22 | * description
23 | *
24 | *
25 | * @author isacc 2020/03/28 1:14
26 | * @since 1.0
27 | */
28 | @RestController("flinkClusterController.v1")
29 | @RequestMapping("/v1/{tenantId}/cluster")
30 | public class ClusterController {
31 |
32 | private final ClusterRepository clusterRepository;
33 | private final ClusterService clusterService;
34 |
35 | public ClusterController(ClusterRepository clusterRepository,
36 | ClusterService clusterService) {
37 | this.clusterRepository = clusterRepository;
38 | this.clusterService = clusterService;
39 | }
40 |
41 | @GetMapping
42 | public IPage list(@PathVariable Long tenantId,
43 | ClusterDTO clusterDTO,
44 | Page clusterPage) {
45 | clusterDTO.setTenantId(tenantId);
46 | clusterPage.addOrder(OrderItem.desc(Cluster.FIELD_CLUSTER_ID));
47 | return clusterRepository.pageAndSortDTO(clusterDTO, clusterPage);
48 | }
49 |
50 | @GetMapping("/{clusterId}")
51 | public ClusterDTO detail(@PathVariable Long tenantId,
52 | @PathVariable Long clusterId) {
53 | return clusterRepository.detail(tenantId, clusterId);
54 | }
55 |
56 | @PostMapping
57 | public ClusterDTO insert(@PathVariable Long tenantId,
58 | @RequestBody @Valid ClusterDTO clusterDTO) {
59 | clusterDTO.setTenantId(tenantId);
60 | return clusterService.insert(clusterDTO);
61 | }
62 |
63 | @PutMapping
64 | public ClusterDTO update(@PathVariable Long tenantId,
65 | @RequestBody @Valid ClusterDTO clusterDTO) {
66 | clusterDTO.setTenantId(tenantId);
67 | return clusterService.update(clusterDTO);
68 | }
69 |
70 | @DeleteMapping
71 | public void delete(@PathVariable Long tenantId,
72 | @RequestBody ClusterDTO clusterDTO) {
73 | clusterDTO.setTenantId(tenantId);
74 | clusterService.delete(clusterDTO);
75 | }
76 |
77 | @GetMapping("/overview/{clusterCode}/config")
78 | public DashboardConfiguration overviewConfig(@PathVariable Long tenantId,
79 | @PathVariable String clusterCode) {
80 | return clusterService.overviewConfig(tenantId, clusterCode);
81 | }
82 |
83 | @GetMapping("/overview/{clusterCode}")
84 | public Map overview(@PathVariable Long tenantId,
85 | @PathVariable String clusterCode) {
86 | return clusterService.overview(tenantId, clusterCode);
87 | }
88 |
89 | @GetMapping("/job/{clusterCode}/overview")
90 | public JobIdsWithStatusOverview jobList(@PathVariable Long tenantId,
91 | @PathVariable String clusterCode) {
92 | return clusterService.jobList(tenantId, clusterCode);
93 | }
94 |
95 | @GetMapping("/job/{clusterCode}/details")
96 | public MultipleJobsDetails jobsDetails(@PathVariable Long tenantId,
97 | @PathVariable String clusterCode) {
98 | return clusterService.jobsDetails(tenantId, clusterCode);
99 | }
100 |
101 | @GetMapping("/job/{clusterCode}/detail")
102 | public JobDetailsInfo jobDetail(@PathVariable Long tenantId,
103 | @PathVariable String clusterCode,
104 | String jobId) {
105 | return clusterService.jobDetail(tenantId, clusterCode, jobId);
106 | }
107 |
108 | @GetMapping("/job/{clusterCode}/yarn-cancel")
109 | public FlinkApiErrorResponse jobYarnCancel(@PathVariable Long tenantId,
110 | @PathVariable String clusterCode,
111 | String jobId) {
112 | return clusterService.jobYarnCancel(tenantId, clusterCode, jobId);
113 | }
114 |
115 | @PostMapping("/job/{clusterCode}/cancel-savepoint")
116 | public TriggerResponseWithSavepoint jobCancelOptionSavepoints(@PathVariable Long tenantId,
117 | @PathVariable String clusterCode,
118 | @RequestBody SavepointTriggerRequestBody savepointTriggerRequestBody) {
119 | return clusterService.jobCancelOptionSavepoints(tenantId, clusterCode, savepointTriggerRequestBody);
120 | }
121 |
122 | @GetMapping("/job/{clusterCode}/terminate")
123 | public FlinkApiErrorResponse jobTerminate(@PathVariable Long tenantId,
124 | @PathVariable String clusterCode,
125 | String jobId,
126 | @RequestParam(required = false) String mode) {
127 | return clusterService.jobTerminate(tenantId, clusterCode, jobId, mode);
128 | }
129 |
130 | @GetMapping("/job/{clusterCode}/rescale")
131 | public TriggerResponse jobRescale(@PathVariable Long tenantId,
132 | @PathVariable String clusterCode,
133 | String jobId,
134 | int parallelism) {
135 | return clusterService.jobRescale(tenantId, clusterCode, jobId, parallelism);
136 | }
137 |
138 | @GetMapping("/job/{clusterCode}/exception")
139 | public JobExceptionsInfo jobException(@PathVariable Long tenantId,
140 | @PathVariable String clusterCode,
141 | String jobId,
142 | @RequestParam(required = false) String maxExceptions) {
143 | return clusterService.jobException(tenantId, clusterCode, jobId, maxExceptions);
144 | }
145 |
146 | @GetMapping("/tm-list/{clusterCode}")
147 | public TaskManagerInfo taskMangerList(@PathVariable Long tenantId,
148 | @PathVariable String clusterCode) {
149 | return clusterService.taskMangerList(tenantId, clusterCode);
150 | }
151 |
152 | @GetMapping("/tm-list/{clusterCode}/detail")
153 | public TaskManagerDetail taskManagerDetail(@PathVariable Long tenantId,
154 | @PathVariable String clusterCode,
155 | String tmId) {
156 | return clusterService.taskManagerDetail(tenantId, clusterCode, tmId);
157 | }
158 |
159 | @GetMapping("/tm-list/{clusterCode}/log")
160 | public String taskManagerLog(@PathVariable Long tenantId,
161 | @PathVariable String clusterCode,
162 | String tmId) {
163 | return clusterService.taskManagerLog(tenantId, clusterCode, tmId);
164 | }
165 |
166 | @GetMapping("/tm-list/{clusterCode}/stdout")
167 | public String taskManagerStdout(@PathVariable Long tenantId,
168 | @PathVariable String clusterCode,
169 | String tmId) {
170 | return clusterService.taskManagerStdout(tenantId, clusterCode, tmId);
171 | }
172 |
173 | @GetMapping("/jm/{clusterCode}/config")
174 | public List