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

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

Github user zentol commented on the issue:

    https://github.com/apache/flink/pull/4958
  
    you can also remove the comment in the DispatcherRestEndpoint that says to 
register the stat file handler last.


> Sort REST handler URLs in RestServerEndpoint
> --------------------------------------------
>
>                 Key: FLINK-8000
>                 URL: https://issues.apache.org/jira/browse/FLINK-8000
>             Project: Flink
>          Issue Type: Improvement
>          Components: REST
>    Affects Versions: 1.4.0
>            Reporter: Till Rohrmann
>            Assignee: Till Rohrmann
>            Priority: Minor
>              Labels: flip-6
>
> In order to make the {{RestServerEndpoint}} more easily extendable, we should 
> automatically sort the returned list of rest handler when calling 
> {{RestServerEndpoint#initializeHandlers}}. That way the order in which the 
> handlers are added to the list is independent of the actual registration 
> order. This is, for example, important for the static file server which 
> always needs to be registered last.
> I propose to add a special {{String}} {{Comparator}} which considers the 
> charactor {{':'}} to be the character with the largest value. That way we 
> should get always the following sort order:
> - URLs without path parameters have precedence over similar URLs where parts 
> are replaced by path parameters (e.g. {{/jobs/overview}}, {{/jobs/:jobid}} 
> and {{/jobs/:jobid/config}}, {{/jobs/:jobid/vertices/:vertexId}})
> - Prefixes are sorted before URLs containing the prefix (e.g. {{/jobs}}, 
> {{/jobs/overview}})



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to