Uploaded image for project: 'Mesos'
  1. Mesos
  2. MESOS-9722

Refactor the sorter interface to enable lazy sorting.

Attach filesAttach ScreenshotAdd voteVotersWatch issueWatchersLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

    Details

      Description

      Currently, the only way for getting a sorted client from sorter is through:

      vector<string> Sorter::sort()
      

      This sorts all the active clients in the tree and returns all of them in a single vector. This is inefficient if the callers end up only needing a few of clients (e.g. when allocating one agent, only one or a few roles are allocated).

      We could refactor the interface to return an iterator-like handle and then callers can query the next the client in the sorting order. This would pave the way for lazy sorting (i.e. only get the nth client) and improve performance.

        Attachments

          Activity

            People

            • Assignee:
              mzhu Meng Zhu
              Reporter:
              mzhu Meng Zhu

              Dates

              • Created:
                Updated:

                Agile

                  Issue deployment