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

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

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

Barisa Obradovic
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/
Reply | Threaded
Open this post in threaded view
|

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

Chesnay Schepler
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/
>