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

Support arithmetic operations for shared resources with consumer counts

    XMLWordPrintableJSON

Details

    Description

      With the introduction of shared resources, we need to add support for arithmetic operations on Resources which perform such operations on shared resources. Shared resources need to be handled differently so as to account for incrementing/decrementing consumer counts maintained by each Resources object.

      Case 1:
      Resources total += shared_resource;

      If shared_resource exists in total, this would imply that the consumer count is incremented. If shared_resource does not exist in total, this would imply we start tracking consumers for this shared resource initialized to 0 consumers.

      Case 2
      Resources total -= shared_resource;

      If shared_resource exists in total, this would imply that the consumer count is decremented. However, the shared_resource is removed from total if the consumer count is originally 0 in total).

      Attachments

        Activity

          People

            anindya.sinha Anindya Sinha
            anindya.sinha Anindya Sinha
            Yan Xu Yan Xu
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: