Skip to content

Commit 865d41f

Browse files
resolve 413 response status for update task.
1 parent 92f6455 commit 865d41f

File tree

1 file changed

+7
-6
lines changed
  • streamis-jobmanager/streamis-jobmanager-server/src/main/java/com/webank/wedatasphere/streamis/jobmanager/restful/api

1 file changed

+7
-6
lines changed

streamis-jobmanager/streamis-jobmanager-server/src/main/java/com/webank/wedatasphere/streamis/jobmanager/restful/api/JobRestfulApi.java

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -328,14 +328,15 @@ private Message withFlinkJobInfo(String jobName, String flinkJobInfoStr, Functio
328328
return flinkJobInfoFunction.apply(flinkJobInfo);
329329
}
330330

331-
@RequestMapping(path = "/updateTask", method = RequestMethod.GET)
331+
@RequestMapping(path = "/updateTask", method = RequestMethod.POST)
332332
public Message updateTask(HttpServletRequest req,
333-
@RequestParam(value = "projectName") String projectName,
334-
@RequestParam(value = "jobName") String jobName,
335-
@RequestParam(value = "appId") String appId,
336-
@RequestParam(value = "metrics") String metrics) {
333+
@RequestBody Map<String, String> json) {
337334
String username = SecurityFilter.getLoginUsername(req);
338-
LOG.info("User {} try to update task for Streamis job {} with appId: {}.", username, jobName, appId);
335+
String projectName = json.get("projectName");
336+
String jobName = json.get("jobName");
337+
String appId = json.get("appId");
338+
String metrics = json.get("metrics");
339+
LOG.info("User {} try to update task for Streamis job {} with appId: {}, metrics: {}.", username, jobName, appId, metrics);
339340
return withStreamJob(req, projectName, jobName, username, streamJob -> {
340341
StreamTask streamTask = streamTaskService.getLatestTaskByJobId(streamJob.getId());
341342
if (streamTask == null) {

0 commit comments

Comments
 (0)