map(self,
requested_resources,
start,
end,
strictend,
onlynodes=None)
| source code
|
The mapping function
The mapping function takes a set of requested resources and maps them
to physical resources (based on the availability in the slot table) in a
specified time interval. The mapper may return a mapping that only
satisfies part of the specified time interval.
Arguments: requested_resources -- A dictionary mapping lease nodes
(integers) to ResourceTuples (representing the desired amount of
resources for that lease node) start -- Starting time of the interval
during which the resources are required end -- Ending time of the
interval strictend -- If True, the only valid mappings are those that
span the entire requested interval. If False, the mapper is allowed to
return mappings that only span part of the interval (this reduced
interval must always start at "start"; the earlier end time is
returned as a return value) onlynodes -- List of physical nodes. Only
look for a mapping in these nodes.
Returns: mapping -- A dictionary mapping lease nodes to physical nodes
maxend -- The end of the interval for which a mapping was found. As noted
in argument "strictend", this return value might not be the
same as "end" preempting -- Leases that would have to be
preempted for the mapping to be valid.
If no mapping is found, the three return values are set to None
|