Add two utility functions for the Result type
Actually, this just moves the functions from the QC module to Types, andremoves a duplicate entry from Cluster.
Signed-off-by: Iustin Pop <iustin@google.com>Reviewed-by: Balazs Lecz <leczb@google.com>
Rework the types used during data loading
This improves on the previous change. Currently, the node and instancelists shipped around during data loading are (again) association lists.For instances it's not a big issue, but the node list is rewrittencontinuously while we assign instances to nodes, and that is very slow....
Loader functions: move from assoc lists to maps
When loading big clusters, the association lists become a bit slow, sowe'll replace this with a simple Map String Int; the change is trivialand can be reverted easily, while it brings up a good speedup in the...
Convert some leftovers to NameAssoc
The type alias NameAssoc has been introduced a long time ago, but thereare some few not-yet-converted cases. In preparation for changes to thattype, let's make sure we use it consistently.
Signed-off-by: Iustin Pop <iustin@google.com>...
Add Cluster.splitCluster for node groups
This splits a top-level cluster information into the component nodegroups. Instance go to the group of their primary node, but otherwise wedon't disallow split instances.
Rework Container.hs and improve test coverage
Since some of the functions we export from Container.hs are 1:1identical to IntMap, we can just export the originals and remove thewrappers. This reduces the code we need to unittest.
Furthermore, we add two simple unittest for the two non-trivial...
Add new command-line option for group selection
Add two functions for checking cluster consistency
For now, we don't support instances allocated across two groups, and wewill reject such clusters. The isClusterConsistent function will returna list of inconsistent instances, potentially allowing operation without...
Add function for nodes to (nodgroup, nodes) split
Unittests included. The function will be needed for consistency checksin the algorithms.
Add a type alias for UUIDs
This is to pottentially allow easier changes later.
View revisions
Also available in: Atom