public class ResourceUtils extends Object
Constructor and Description |
---|
ResourceUtils() |
Modifier and Type | Method and Description |
---|---|
static double |
avg(Collection<Double> list)
Caculate the average of a collection of doubles
|
static void |
checkInitCPU(Map<String,Double> topology_resources,
String Com,
Map topologyConf) |
static void |
checkInitMem(Map<String,Double> topology_resources,
String Com,
Map topologyConf) |
static void |
checkIntialization(Map<String,Double> topology_resources,
String Com,
Map topologyConf) |
static Map<String,Map<String,Double>> |
getBoltsResources(StormTopology topology,
Map topologyConf) |
static Map<String,Map<String,Double>> |
getSpoutsResources(StormTopology topology,
Map topologyConf) |
static Map<String,Double> |
parseResources(String input) |
static String |
printScheduling(Cluster cluster,
Topologies topologies)
print scheduling for debug purposes
|
static double |
sum(Collection<Double> list)
Calculate the sum of a collection of doubles
|
public static Map<String,Map<String,Double>> getBoltsResources(StormTopology topology, Map topologyConf)
public static Map<String,Map<String,Double>> getSpoutsResources(StormTopology topology, Map topologyConf)
public static void checkIntialization(Map<String,Double> topology_resources, String Com, Map topologyConf)
public static void checkInitMem(Map<String,Double> topology_resources, String Com, Map topologyConf)
public static void checkInitCPU(Map<String,Double> topology_resources, String Com, Map topologyConf)
public static String printScheduling(Cluster cluster, Topologies topologies)
print scheduling for debug purposes
cluster
- topologies
- public static double sum(Collection<Double> list)
Calculate the sum of a collection of doubles
list
- collection of doublespublic static double avg(Collection<Double> list)
Caculate the average of a collection of doubles
list
- a collection of doublesCopyright © 2022 The Apache Software Foundation. All Rights Reserved.