[jira] [Commented] (FLINK-4787) Add REST API call for cancel-with-savepoints

2016-10-28 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on FLINK-4787:
---

Github user asfgit closed the pull request at:

https://github.com/apache/flink/pull/2626


> Add REST API call for cancel-with-savepoints
> 
>
> Key: FLINK-4787
> URL: https://issues.apache.org/jira/browse/FLINK-4787
> Project: Flink
>  Issue Type: Improvement
>  Components: Webfrontend
>Reporter: Ufuk Celebi
> Fix For: 1.2.0
>
>
> As a follow up to FLINK-4717, expose the cancel-with-savepoint command via 
> the REST API.
> {code}
> /jobs/:jobid/cancel-with-savepoint/
> /jobs/:jobid/cancel-with-savepoint/:targetDirectory
> {code}
> The first command goes to the default savepoint directory, the second one 
> uses the given target directory.
> The calls need to be async, as triggering a savepoint can take some time. For 
> this, the handlers return a {{201 (Accepted)}} response with the location of 
> the status, e.g. {{/jobs/:jobid/cancel-with-savepoint/in-progress/:id}}.
> The user has to check that location until the final savepoint path is 
> returned.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (FLINK-4787) Add REST API call for cancel-with-savepoints

2016-10-27 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on FLINK-4787:
---

Github user uce commented on the issue:

https://github.com/apache/flink/pull/2626
  
Updated the commits. The build error was caused by a failure during rebase. 
Should be fixed now.


> Add REST API call for cancel-with-savepoints
> 
>
> Key: FLINK-4787
> URL: https://issues.apache.org/jira/browse/FLINK-4787
> Project: Flink
>  Issue Type: Improvement
>  Components: Webfrontend
>Reporter: Ufuk Celebi
>
> As a follow up to FLINK-4717, expose the cancel-with-savepoint command via 
> the REST API.
> {code}
> /jobs/:jobid/cancel-with-savepoint/
> /jobs/:jobid/cancel-with-savepoint/:targetDirectory
> {code}
> The first command goes to the default savepoint directory, the second one 
> uses the given target directory.
> The calls need to be async, as triggering a savepoint can take some time. For 
> this, the handlers return a {{201 (Accepted)}} response with the location of 
> the status, e.g. {{/jobs/:jobid/cancel-with-savepoint/in-progress/:id}}.
> The user has to check that location until the final savepoint path is 
> returned.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (FLINK-4787) Add REST API call for cancel-with-savepoints

2016-10-24 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on FLINK-4787:
---

Github user rmetzger commented on the issue:

https://github.com/apache/flink/pull/2626
  
Looks like the tests are failing.
I quickly scrolled over the changes. +1 to merge.


> Add REST API call for cancel-with-savepoints
> 
>
> Key: FLINK-4787
> URL: https://issues.apache.org/jira/browse/FLINK-4787
> Project: Flink
>  Issue Type: Improvement
>  Components: Webfrontend
>Reporter: Ufuk Celebi
>
> As a follow up to FLINK-4717, expose the cancel-with-savepoint command via 
> the REST API.
> {code}
> /jobs/:jobid/cancel-with-savepoint/
> /jobs/:jobid/cancel-with-savepoint/:targetDirectory
> {code}
> The first command goes to the default savepoint directory, the second one 
> uses the given target directory.
> The calls need to be async, as triggering a savepoint can take some time. For 
> this, the handlers return a {{201 (Accepted)}} response with the location of 
> the status, e.g. {{/jobs/:jobid/cancel-with-savepoint/in-progress/:id}}.
> The user has to check that location until the final savepoint path is 
> returned.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (FLINK-4787) Add REST API call for cancel-with-savepoints

2016-10-12 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on FLINK-4787:
---

GitHub user uce opened a pull request:

https://github.com/apache/flink/pull/2626

[FLINK-4787] [runtime-web] Expose cancel-with-savepoint via REST API

Follow up to #2609, exposing the cancel-with-savepoint command via the REST 
API. The relevant commits are the last two ones.

The `RequestHandler` now returns a generic `HttpResponse` instead of a 
`String`. This enables handlers to return custom reponses (different http 
codes, etc.). Now most handlers extend thee `AbstractJsonRequestHandler` for 
default JSON responses (which used to be handled by the generic 
`RequestHandler`).

Adds handlers for triggering and monitoring a job cancellation with 
savepoints. Since this operation can take some time, we do this asynchronously. 
According to various online resources, the way to go for REST APIs in such 
cases is to return HTTP 201 accepted with the location of the in-progress 
operation.

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/uce/flink 4787-cancel_with_savepoint_rest_api

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/flink/pull/2626.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #2626


commit 99a9621383e6a223e39e4ec22d60671a205d958d
Author: Ufuk Celebi 
Date:   2016-10-06T14:43:42Z

[FLINK-4512] [FLIP-10] Add option to persist periodic checkpoints

[FLINK-4509] [FLIP-10] Specify savepoint directory per savepoint
[FLINK-4507] [FLIP-10] Deprecate savepoint backend config

commit 25ffc04d7e5d7ef9538447ee5162c0d203e96e89
Author: Ufuk Celebi 
Date:   2016-10-07T09:48:47Z

[FLINK-4717] Add CancelJobWithSavepoint

- Adds CancelJobWithSavepoint message, which triggers a savepoint
  before cancelling the respective job.
- Adds -s [targetDirectory] option to CLI cancel command:
* bin/flink cancel  (regular cancelling)
* bin/flink cancel -s  (cancel with savepoint to default dir)
* bin/flink cancek -s   (cancel with savepoint to 
targetDir)

commit bc88dba90a263e80691448e20644e5f126551bb6
Author: Ufuk Celebi 
Date:   2016-10-11T08:08:14Z

[FLINK-4787] [runtime-web] Return generic HttpResponse in RequestHandler

- Let RequestHandler return a generic HttpResponse instead of a String. This
  enables handlers to return custom reponses (differnt http codes, etc.)
- Introduce AbstractJsonRequestHandler for default JSON responses

commit ecbcf46f5a9d874dbdd908d48c7035c1cb338c1a
Author: Ufuk Celebi 
Date:   2016-10-11T08:09:20Z

[FLINK-4787] [runtime-web] Add JobCancellationWithSavepointHandlers

- Add handlers for triggering and monitoring job cancellation with
  savepoints.




> Add REST API call for cancel-with-savepoints
> 
>
> Key: FLINK-4787
> URL: https://issues.apache.org/jira/browse/FLINK-4787
> Project: Flink
>  Issue Type: Improvement
>  Components: Webfrontend
>Reporter: Ufuk Celebi
>
> As a follow up to FLINK-4717, expose the cancel-with-savepoint command via 
> the REST API.
> {code}
> /jobs/:jobid/cancel-with-savepoint/
> /jobs/:jobid/cancel-with-savepoint/:targetDirectory
> {code}
> The first command goes to the default savepoint directory, the second one 
> uses the given target directory.
> The calls need to be async, as triggering a savepoint can take some time. For 
> this, the handlers return a {{201 (Accepted)}} response with the location of 
> the status, e.g. {{/jobs/:jobid/cancel-with-savepoint/in-progress/:id}}.
> The user has to check that location until the final savepoint path is 
> returned.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)