[
https://issues.apache.org/jira/browse/FLINK-5870?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15875980#comment-15875980
]
ASF GitHub Bot commented on FLINK-5870:
---------------------------------------
GitHub user zentol opened a pull request:
https://github.com/apache/flink/pull/3376
[FLINK-5870] Handlers define REST URLs
This PR allows ```RequestHandler```s to define the REST URLs under which
they should be registered.
For this purpose the following method was added to the ```RequestHandler```
interface: ```String[] getPaths();```
Additionally, a utility class ```RestUtils``` was added that contains a
number of often used REST URL components as constants (things like "job" or
":jobid"), and a utility method to concatenate these components into a REST URL
(basically concat with "/"). The idea here is to prevent typos and such.
Tests were added for every single handler to verify that the correct paths
are returned. As a result if any URL should be changed, which isn't allowed
since the REST API is considered stable, a test will now fail.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/zentol/flink 5870_handler_url
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/flink/pull/3376.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 #3376
----
commit 6f0987f46afc267023b9834a3d7abd4e5762f2e1
Author: zentol <[email protected]>
Date: 2017-02-20T15:29:27Z
[FLINK-5870] Handlers define REST URLs
----
> Make handlers aware of their REST URLs
> --------------------------------------
>
> Key: FLINK-5870
> URL: https://issues.apache.org/jira/browse/FLINK-5870
> Project: Flink
> Issue Type: Improvement
> Components: Webfrontend
> Reporter: Chesnay Schepler
> Assignee: Chesnay Schepler
> Fix For: 1.3.0
>
>
> The handlers in the WebRuntimeMonitor are currently unaware of the actual
> REST URL used. The handlers are simply registered under a given URL, without
> any guarantee that the handler can actually deal with that URL.
> I propose to let handlers themselves specify under which URL's they are
> supposed to be reachable. This provides are tighter coupling between URL and
> handler.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)