Safe Haskell | Safe-Infered |
---|
Implementation of special handling of dedicated clusters.
- isDedicated :: ClusterData -> Maybe String -> Bool
- minimallyCompliantInstance :: ISpec -> Instance
- testInstances :: IPolicy -> [Instance]
- allocationVector :: [Instance] -> Node -> [Int]
- type Metric = ([Int], Int)
- lostAllocationsMetric :: AlgorithmOptions -> [Instance] -> Instance -> Node -> OpResult (Metric, Node)
- allocateOnSingle :: AlgorithmOptions -> List -> Instance -> Ndx -> OpResult (GenericAllocElement Metric)
- allocateOnPair :: AlgorithmOptions -> List -> Instance -> Ndx -> Ndx -> OpResult (GenericAllocElement Metric)
- findAllocation :: AlgorithmOptions -> List -> List -> Gdx -> Instance -> Int -> Result (GenericAllocSolution Metric, [String])
- findMGAllocation :: AlgorithmOptions -> List -> List -> List -> Instance -> Int -> Result (GenericAllocSolution Metric)
- runDedicatedAllocation :: AlgorithmOptions -> Request -> (Maybe (List, List), String)
Documentation
isDedicated :: ClusterData -> Maybe String -> BoolSource
Given a cluster description and maybe a group name, decide if that group, or all allocatable groups if no group is given, is dedicated.
testInstances :: IPolicy -> [Instance]Source
From an instance policy get the list of test instances, in correct order, for which the allocation count has to be determined for the lost allocations metrics.
allocationVector :: [Instance] -> Node -> [Int]Source
Given the test instances, compute the allocations vector of a node
lostAllocationsMetric :: AlgorithmOptions -> [Instance] -> Instance -> Node -> OpResult (Metric, Node)Source
Given the test instances and an instance to be placed, compute the lost allocations metrics for that node, together with the modified node. Return Bad if it is not possible to place the instance on that node.
allocateOnSingle :: AlgorithmOptions -> List -> Instance -> Ndx -> OpResult (GenericAllocElement Metric)Source
Allocate an instance on a given node.
allocateOnPair :: AlgorithmOptions -> List -> Instance -> Ndx -> Ndx -> OpResult (GenericAllocElement Metric)Source
Allocate an instance on a given pair of nodes.
findAllocation :: AlgorithmOptions -> List -> List -> Gdx -> Instance -> Int -> Result (GenericAllocSolution Metric, [String])Source
Find an allocation for an instance on a group.
findMGAllocation :: AlgorithmOptions -> List -> List -> List -> Instance -> Int -> Result (GenericAllocSolution Metric)Source
runDedicatedAllocation :: AlgorithmOptions -> Request -> (Maybe (List, List), String)Source
Handle allocation requests in the dedicated scenario.