GJL commented on a change in pull request #9013: [FLINK-13136] Fix
documentation error about stopping job with restful api
URL: https://github.com/apache/flink/pull/9013#discussion_r323583397
##########
File path:
flink-clients/src/main/java/org/apache/flink/client/program/rest/RestClusterClient.java
##########
@@ -375,7 +374,7 @@ public JobSubmissionResult submitJob(JobGraph jobGraph,
ClassLoader classLoader)
public void cancel(JobID jobID) throws Exception {
JobCancellationMessageParameters params = new
JobCancellationMessageParameters();
params.jobPathParameter.resolve(jobID);
-
params.terminationModeQueryParameter.resolve(Collections.singletonList(TerminationModeQueryParameter.TerminationMode.CANCEL));
+
params.terminationModeQueryParameter.resolve(Collections.singletonList("CANCEL"));
Review comment:
I liked using the enum `TerminationModeQueryParameter.TerminationMode`
better because now we have to repeat String constants. The deprecation of
`TerminationModeQueryParameter` and `TerminationMode` was wrong and should be
reverted. What should be deprecated is `TerminationMode.STOP` since
`TerminationMode.CANCEL` is still valid for non-checkpointed jobs and batch
jobs.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services