Safe Haskell | None |
---|
Cluster rebalancer.
Synopsis
- options :: IO [OptType]
- arguments :: [ArgCompletion]
- annotateOpCode :: Maybe String -> Timestamp -> Annotator
- iterateDepth :: Bool -> AlgorithmOptions -> Table -> Int -> Int -> Int -> [MoveJob] -> Score -> IO (Table, [MoveJob])
- printStats :: List -> List -> IO ()
- maybeExecJobs :: Options -> [a] -> List -> List -> [JobSet] -> IO (Result ())
- selectGroup :: Options -> List -> List -> List -> IO (String, (List, List))
- checkCluster :: Int -> List -> List -> IO ()
- checkGroup :: Bool -> Int -> String -> List -> List -> IO ()
- checkNeedRebalance :: Options -> Score -> Score -> IO ()
- main :: Options -> [String] -> IO ()
Documentation
arguments :: [ArgCompletion] Source #
The list of arguments supported by the program.
annotateOpCode :: Maybe String -> Timestamp -> Annotator Source #
Wraps an OpCode
in a MetaOpCode
while also adding a comment
about what generated the opcode.
:: Bool | Whether to print moves |
-> AlgorithmOptions | Algorithmic options to apply |
-> Table | The starting table |
-> Int | Remaining length |
-> Int | Max node name len |
-> Int | Max instance name len |
-> [MoveJob] | Current command list |
-> Score | Score at which to stop |
-> IO (Table, [MoveJob]) | The resulting table and commands |
Start computing the solution at the given depth and recurse until we find a valid solution or we exceed the maximum depth.
printStats :: List -> List -> IO () Source #
Displays the cluster stats.
maybeExecJobs :: Options -> [a] -> List -> List -> [JobSet] -> IO (Result ()) Source #
Executes the jobs, if possible and desired.
selectGroup :: Options -> List -> List -> List -> IO (String, (List, List)) Source #
Select the target node group.
checkCluster :: Int -> List -> List -> IO () Source #
Do a few checks on the cluster data.
checkGroup :: Bool -> Int -> String -> List -> List -> IO () Source #
Do a few checks on the selected group data.