flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Till Rohrmann (JIRA)" <j...@apache.org>
Subject [jira] [Created] (FLINK-8000) Sort REST handler URLs in RestServerEndpoint
Date Mon, 06 Nov 2017 16:59:00 GMT
Till Rohrmann created FLINK-8000:

             Summary: 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

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

- 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}},
- Prefixes are sorted before URLs containing the prefix (e.g. {{/jobs}}, {{/jobs/overview}})

This message was sent by Atlassian JIRA

View raw message