Thanks for reporting this Juho.
I've created FLINK-9130 [1] to address the issue.

Best Fabian

[1] https://issues.apache.org/jira/browse/FLINK-9130

2018-04-04 12:03 GMT+02:00 Juho Autio <juho.au...@rovio.com>:

> Thank you, it works!
>
> I would still expect this to be documented.
>
> If I understood correctly, the documentation is generated from these
> Javadocs:
> https://github.com/apache/flink/blob/release-1.5/flink-
> runtime/src/main/java/org/apache/flink/runtime/rest/
> handler/job/savepoints/SavepointHandlers.java#L59
>
> It only mentions the "target-directory" parameter, "cancel-job" is missing.
>
> On Thu, Mar 29, 2018 at 8:42 AM, Gary Yao <g...@data-artisans.com> wrote:
>
>> Hi Juho,
>>
>> Sorry, I should have included an example. To cancel the job:
>>
>>   curl -XPOST host:port/jobs/:jobid/savepoints -d '{"cancel-job":
>> true}'
>>
>> Let me know if it works for you.
>>
>> Best,
>> Gary
>>
>> On Thu, Mar 29, 2018 at 10:39 AM, Juho Autio <juho.au...@rovio.com>
>> wrote:
>>
>>> Thanks Gary. And what if I want to match the old behaviour ie. have the
>>> job cancelled after savepoint has been created? Maybe I saw some optional
>>> field for that purpose, that could be put into JSON payload of POST.. But
>>> this documentation doesn't cover it:
>>> https://github.com/apache/flink/blob/release-1.5/flink-runti
>>> me/src/main/java/org/apache/flink/runtime/rest/handler/job/s
>>> avepoints/SavepointHandlers.java#L59
>>>
>>>
>>> On Thu, Mar 29, 2018 at 11:25 AM, Gary Yao <g...@data-artisans.com>
>>> wrote:
>>>
>>>> Hi Juho,
>>>>
>>>> Thank you for testing the Apache Flink 1.5 release.
>>>>
>>>> For FLIP-6 [1], the "cancel with savepoint" API was reworked.
>>>> Unfortunately the
>>>> FLIP-6 REST API documentation still needs to be re-generated [2][3].
>>>> Under the
>>>> new API, you first issue a POST request against
>>>> /jobs/:jobid/savepoints, and
>>>> then poll /jobs/:jobid/savepoints/:savepointtriggerid with HTTP GET.
>>>> See [4] for
>>>> more details.
>>>>
>>>> Best,
>>>> Gary
>>>>
>>>> [1] https://cwiki.apache.org/confluence/pages/viewpage.action?pa
>>>> geId=65147077
>>>> [2] https://ci.apache.org/projects/flink/flink-docs-master/monit
>>>> oring/rest_api.html#flip-6
>>>> [3] https://issues.apache.org/jira/browse/FLINK-9104
>>>> [4] https://github.com/apache/flink/blob/release-1.5/flink-runti
>>>> me/src/main/java/org/apache/flink/runtime/rest/handler/job/s
>>>> avepoints/SavepointHandlers.java#L59
>>>>
>>>> On Thu, Mar 29, 2018 at 10:04 AM, Juho Autio <juho.au...@rovio.com>
>>>> wrote:
>>>>
>>>>> With a fresh build from release-1.5 branch, calling
>>>>> /cancel-with-savepoint fails with 404 Not Found.
>>>>>
>>>>> The snapshot docs still mention /cancel-with-savepoint:
>>>>>
>>>>> https://ci.apache.org/projects/flink/flink-docs-master/monit
>>>>> oring/rest_api.html#cancel-job-with-savepoint
>>>>>
>>>>> 1. How can I achieve the same result as with GET /cancel-with-savepoint
>>>>> before?
>>>>> 2. Are the docs going to be updated?
>>>>>
>>>>> It seems like it might be related to this:
>>>>> https://issues.apache.org/jira/browse/FLINK-8317
>>>>>
>>>>> Thanks..
>>>>>
>>>>
>>>>
>>>
>>
>

Reply via email to