Uploaded image for project: 'Flink'
  1. Flink
  2. FLINK-8000

Sort REST handler URLs in RestServerEndpoint

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 1.4.0
    • 1.5.0
    • Runtime / REST

    Description

      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)

      Attachments

        Issue Links

          Activity

            People

              trohrmann Till Rohrmann
              trohrmann Till Rohrmann
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: