You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@flink.apache.org by vipul singh <ne...@gmail.com> on 2018/08/14 06:43:49 UTC

Flink REST api for cancel with savepoint on yarn

Hello,

I have a question about flink 1.5/1.6 REST endpoints. I was trying to see
how the rest endpoints have changed wrt to cancelling with savepoint; it
seems like now to cancel with savepoint one need to use POST api /
jobs/:jobid/savepoints
<https://github.com/apache/flink/blob/release-1.5.0/flink-runtime/src/main/java/org/apache/flink/runtime/rest/handler/job/savepoints/SavepointHandlers.java#L60:34>

While trying to run these queries on yarn, it seems like yarn currently
dosent support these POST calls:
https://issues.apache.org/jira/browse/YARN-2031

On digging further and looking at this email
<http://apache-flink-user-mailing-list-archive.2336050.n4.nabble.com/Wrong-endpoints-to-cancel-a-job-td19745.html>,
it seems like there is a /jobs/:jobid/yarn-cancel api which does something
similar, but that dosent support cancel-with-savepoin currentlyt. Are there
any plans to add this functionality to this API for future? Is there any
workaround for this for now?

Thanks,
Vipul

Re: Flink REST api for cancel with savepoint on yarn

Posted by Gary Yao <ga...@data-artisans.com>.
Hi Vipul,

We are aware of YARN-2031. There are some ideas how to workaround it, which
are tracked here:

    https://issues.apache.org/jira/browse/FLINK-9478

At the moment you have the following options:

    1. Find out the master's address from ZooKeeper [1] and issue the HTTP
request against the master directly.
    2. Use the Flink CLI. The CLI will lookup the master's address.

Best,
Gary

[1]
https://github.com/apache/flink/blob/9614310ef207dd29dfee76cd878825534f41ff00/flink-runtime/src/main/java/org/apache/flink/runtime/leaderretrieval/ZooKeeperLeaderRetrievalService.java#L162

On Tue, Aug 14, 2018 at 8:43 AM, vipul singh <ne...@gmail.com> wrote:

> Hello,
>
> I have a question about flink 1.5/1.6 REST endpoints. I was trying to see
> how the rest endpoints have changed wrt to cancelling with savepoint; it
> seems like now to cancel with savepoint one need to use POST api /
> jobs/:jobid/savepoints
> <https://github.com/apache/flink/blob/release-1.5.0/flink-runtime/src/main/java/org/apache/flink/runtime/rest/handler/job/savepoints/SavepointHandlers.java#L60:34>
>
> While trying to run these queries on yarn, it seems like yarn currently
> dosent support these POST calls: https://issues.apache.
> org/jira/browse/YARN-2031
>
> On digging further and looking at this email
> <http://apache-flink-user-mailing-list-archive.2336050.n4.nabble.com/Wrong-endpoints-to-cancel-a-job-td19745.html>,
> it seems like there is a /jobs/:jobid/yarn-cancel api which does
> something similar, but that dosent support cancel-with-savepoin currentlyt.
> Are there any plans to add this functionality to this API for future? Is
> there any workaround for this for now?
>
> Thanks,
> Vipul
>