You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@flink.apache.org by Barisa Obradovic <bb...@gmail.com> on 2018/10/17 13:40:49 UTC

Either bug in the flink, or out of date documentation ( flink 1.6 , cancel API rest endpoint )

In the flink documenation, to cancel the job, request should be made to

DELETE request to /jobs/:jobid/cancel
https://ci.apache.org/projects/flink/flink-docs-stable/monitoring/rest_api.html#job-cancellation

However, when I run this command, I get 404 back from the jobmanager.

After reading the source code, I can see that clojure client uses PATCH
operation instead, and doesn't include `cancel` suffix in the URL:
https://github.com/apache/flink/blob/ad79e6953cdbd9571f0605810b7d5f42749b38f4/flink-jepsen/test/jepsen/flink/client_test.clj#L48
Also, the job termination headers say PATCH,
https://github.com/apache/flink/blob/824a823ba4ca6f29075a187ed1a3a301089f1a99/flink-runtime/src/main/java/org/apache/flink/runtime/rest/messages/JobTerminationHeaders.java#L59

Locally testing, I can see that 
```
curl -k -v -X PATCH
'https://localhost:6125/jobs/088a37f04e867e5dd0cde558f31dd02b'
``` Gives me 202, for success.

So, does this mean that documentation is out of date? If so, I'm happy to
update it, just wanted to check here I didn't miss anything




--
Sent from: http://apache-flink-user-mailing-list-archive.2336050.n4.nabble.com/

Re: Either bug in the flink, or out of date documentation ( flink 1.6 , cancel API rest endpoint )

Posted by Chesnay Schepler <ch...@apache.org>.
The section you're looking at is the legacy documentation which only 
applies if the cluster is running in legacy mode.

You want to look at the "Dispatcher" section 
(https://ci.apache.org/projects/flink/flink-docs-release-1.6/monitoring/rest_api.html#dispatcher), 
which documents the PATCH operation.

On 17.10.2018 15:40, Barisa Obradovic wrote:
> In the flink documenation, to cancel the job, request should be made to
>
> DELETE request to /jobs/:jobid/cancel
> https://ci.apache.org/projects/flink/flink-docs-stable/monitoring/rest_api.html#job-cancellation
>
> However, when I run this command, I get 404 back from the jobmanager.
>
> After reading the source code, I can see that clojure client uses PATCH
> operation instead, and doesn't include `cancel` suffix in the URL:
> https://github.com/apache/flink/blob/ad79e6953cdbd9571f0605810b7d5f42749b38f4/flink-jepsen/test/jepsen/flink/client_test.clj#L48
> Also, the job termination headers say PATCH,
> https://github.com/apache/flink/blob/824a823ba4ca6f29075a187ed1a3a301089f1a99/flink-runtime/src/main/java/org/apache/flink/runtime/rest/messages/JobTerminationHeaders.java#L59
>
> Locally testing, I can see that
> ```
> curl -k -v -X PATCH
> 'https://localhost:6125/jobs/088a37f04e867e5dd0cde558f31dd02b'
> ``` Gives me 202, for success.
>
> So, does this mean that documentation is out of date? If so, I'm happy to
> update it, just wanted to check here I didn't miss anything
>
>
>
>
> --
> Sent from: http://apache-flink-user-mailing-list-archive.2336050.n4.nabble.com/
>