Safe Haskell | None |
---|
Cluster checker.
Synopsis
- options :: IO [OptType]
- arguments :: [ArgCompletion]
- data Phase
- data Level
- = GroupLvl String
- | ClusterLvl
- type GroupInfo = (Gdx, (List, List))
- type GroupStats = ((Group, Double), [Int])
- htcPrefix :: String
- commonData :: Options -> [(String, String)]
- groupData :: Options -> [(String, String)]
- clusterData :: Options -> [(String, String)]
- phasePrefix :: Phase -> String
- levelPrefix :: Level -> String
- keysData :: Options -> Level -> [String]
- phaseDescr :: Phase -> String
- descrData :: Options -> Level -> [String]
- phaseLevelDescr :: Phase -> Level -> String
- printKeysHTC :: [(String, String)] -> IO ()
- printBool :: Bool -> Bool -> String
- printGroupsMappings :: List -> IO ()
- prepareKey :: Level -> Phase -> String -> String
- printStats :: Options -> Bool -> Level -> Phase -> [String] -> IO ()
- extractGroupData :: Bool -> Group -> String
- prepareGroupValues :: [Int] -> Double -> [String]
- prepareClusterValues :: Bool -> [Int] -> [Bool] -> [String]
- printGroupStats :: Options -> Bool -> Phase -> GroupStats -> IO ()
- printClusterStats :: Options -> Bool -> Phase -> [Int] -> Bool -> IO ()
- clusterNeedsRebalance :: [Int] -> Bool
- perGroupChecks :: Options -> List -> GroupInfo -> GroupStats
- executeSimulation :: Options -> Table -> Double -> Gdx -> List -> List -> IO GroupInfo
- maybeSimulateGroupRebalance :: Options -> GroupInfo -> IO GroupInfo
- maybeSimulateRebalance :: Bool -> Options -> [GroupInfo] -> IO [GroupInfo]
- printFinalHTC :: Bool -> IO ()
- main :: Options -> [String] -> IO ()
Documentation
arguments :: [ArgCompletion] Source #
The list of arguments supported by the program.
Level of presented statistics.
GroupLvl String | Group level, with name |
ClusterLvl | Cluster level |
type GroupInfo = (Gdx, (List, List)) Source #
A type alias for a group index and node/instance lists.
type GroupStats = ((Group, Double), [Int]) Source #
A type alias for group stats.
commonData :: Options -> [(String, String)] Source #
Data showed both per group and per cluster.
clusterData :: Options -> [(String, String)] Source #
Data showed per cluster.
phasePrefix :: Phase -> String Source #
Phase-specific prefix for machine readable version.
levelPrefix :: Level -> String Source #
Level-specific prefix for machine readable version.
keysData :: Options -> Level -> [String] Source #
Machine-readable keys to show depending on given level.
phaseDescr :: Phase -> String Source #
Description of phases for human readable version.
phaseLevelDescr :: Phase -> Level -> String Source #
Human readable prefix for statistics.
printKeysHTC :: [(String, String)] -> IO () Source #
Format a list of key, value as a shell fragment.
:: Bool | Whether the result should be machine readable |
-> Bool | Value to be converted to string |
-> String |
Prepare string from boolean value.
printGroupsMappings :: List -> IO () Source #
Print mapping from group idx to group uuid (only in machine readable mode).
prepareKey :: Level -> Phase -> String -> String Source #
Prepare a single key given a certain level and phase of simulation.
:: Options | |
-> Bool | If the output should be machine readable |
-> Level | Level on which we are printing |
-> Phase | Current phase of simulation |
-> [String] | Values to print |
-> IO () |
Print all the statistics for given level and phase.
extractGroupData :: Bool -> Group -> String Source #
Extract name or idx from group.
prepareGroupValues :: [Int] -> Double -> [String] Source #
Prepare values for group.
prepareClusterValues :: Bool -> [Int] -> [Bool] -> [String] Source #
Prepare values for cluster.
printGroupStats :: Options -> Bool -> Phase -> GroupStats -> IO () Source #
Print all the statistics on a group level.
printClusterStats :: Options -> Bool -> Phase -> [Int] -> Bool -> IO () Source #
Print all the statistics on a cluster (global) level.
clusterNeedsRebalance :: [Int] -> Bool Source #
Check if any of cluster metrics is non-zero.
perGroupChecks :: Options -> List -> GroupInfo -> GroupStats Source #
Check group for N+1 hapiness, conflicts of primaries on nodes and instances residing on offline nodes.
executeSimulation :: Options -> Table -> Double -> Gdx -> List -> List -> IO GroupInfo Source #
Use Hbal's iterateDepth to simulate group rebalance.
maybeSimulateGroupRebalance :: Options -> GroupInfo -> IO GroupInfo Source #
Simulate group rebalance if group's score is not good
maybeSimulateRebalance Source #
:: Bool | Whether to simulate rebalance |
-> Options | Command line options |
-> [GroupInfo] | Group data |
-> IO [GroupInfo] |
Decide whether to simulate rebalance.
printFinalHTC :: Bool -> IO () Source #
Prints the final OK
marker in machine readable output.