You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "Dominik Wosiński (JIRA)" <ji...@apache.org> on 2018/08/20 14:12:00 UTC

[jira] [Commented] (FLINK-10178) Job cancel REST API not working

    [ https://issues.apache.org/jira/browse/FLINK-10178?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16585985#comment-16585985 ] 

Dominik Wosiński commented on FLINK-10178:
------------------------------------------

[~mrooding]

You are indeed right about this!

Not exactly sure, if that is the desired behaviour (probably not), but currently from what I have found in code You can stop the job by sending PATCH to /jobs/:jobid . [~till.rohrmann] could You please confirm if this is a bug or should the docs be updated? 

> Job cancel REST API not working
> -------------------------------
>
>                 Key: FLINK-10178
>                 URL: https://issues.apache.org/jira/browse/FLINK-10178
>             Project: Flink
>          Issue Type: Bug
>          Components: REST
>    Affects Versions: 1.5.1, 1.5.2, 1.6.0
>         Environment: Running as a Docker container using the default flink Docker images.
>            Reporter: Marc Rooding
>            Priority: Minor
>
> I've been trying to work with the Flink REST API to cancel a running job. 
> When I deploy a simple job I can retrieve the Job information using the *jobs/overview* endpoint which returns:
> {code:java}
> {
>   "jobs": [
>     {
>       "jid": "f907f847451cfd9231b7d3c0662b149b",
>       "name": "Windowed WordCount",
>       "state": "RUNNING",
>       "start-time": 1534770489437,
>       "end-time": -1,
>       "duration": 72682,
>       "last-modification": 1534770489942,
>       "tasks": {
>         "total": 6,
>         "created": 0,
>         "scheduled": 0,
>         "deploying": 0,
>         "running": 6,
>         "finished": 0,
>         "canceling": 0,
>         "canceled": 0,
>         "failed": 0,
>         "reconciling": 0
>       }
>     }
>   ]
> }
> {code}
> I can also request more information about the job using the *jobs/f907f847451cfd9231b7d3c0662b149b* endpoint.
> According to the documentation, I should be able to do a DELETE request to *jobs/f907f847451cfd9231b7d3c0662b149b/cancel.* Doing so returns a 404 with the following body:
> {code:java}
> {"errors":["Not found."]}{code}
> I also tried a GET request to *jobs/**f907f847451cfd9231b7d3c0662b149b/cancel-with-savepoint/.* That simply returns a 404 without a body.
> I tried it with Flink 1.5.1, 1.5.2 and 1.6.0 and get consistent results.
> I looked at which API is being used by the Flink web UI when pressing the 'Cancel' button and that one seems to go to *jobs/**f907f847451cfd9231b7d3c0662b149b/yarn-cancel*. If I do a GET request to that one manually it does actually cancel the job.
> I've been looking into the Flink source code but couldn't find an immediate clue to what's going on. 



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)