Package org.apache.sysds.resource
Class CloudUtils
- java.lang.Object
-
- org.apache.sysds.resource.CloudUtils
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
CloudUtils.CloudProvider
static class
CloudUtils.InstanceSize
static class
CloudUtils.InstanceType
-
Field Summary
Fields Modifier and Type Field Description static double
DEFAULT_CLUSTER_LAUNCH_TIME
static double
MINIMAL_EXECUTION_TIME
-
Constructor Summary
Constructors Constructor Description CloudUtils()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract double
calculateClusterPrice(EnumerationUtils.ConfigurationPoint config, double time)
This method calculates the cluster price based on the estimated execution time and the cluster configuration.static long
GBtoBytes(double gb)
abstract CloudUtils.InstanceSize
getInstanceSize(String instanceName)
abstract CloudUtils.InstanceType
getInstanceType(String instanceName)
HashMap<String,CloudInstance>
loadInstanceInfoTable(String instanceTablePath)
Performs read of csv file filled with VM instance characteristics.abstract boolean
validateInstanceName(String instanceName)
-
-
-
Field Detail
-
MINIMAL_EXECUTION_TIME
public static final double MINIMAL_EXECUTION_TIME
- See Also:
- Constant Field Values
-
DEFAULT_CLUSTER_LAUNCH_TIME
public static final double DEFAULT_CLUSTER_LAUNCH_TIME
- See Also:
- Constant Field Values
-
-
Method Detail
-
GBtoBytes
public static long GBtoBytes(double gb)
-
validateInstanceName
public abstract boolean validateInstanceName(String instanceName)
-
getInstanceType
public abstract CloudUtils.InstanceType getInstanceType(String instanceName)
-
getInstanceSize
public abstract CloudUtils.InstanceSize getInstanceSize(String instanceName)
-
calculateClusterPrice
public abstract double calculateClusterPrice(EnumerationUtils.ConfigurationPoint config, double time)
This method calculates the cluster price based on the estimated execution time and the cluster configuration.- Parameters:
config
- the cluster configuration for the calculationtime
- estimated execution time in seconds- Returns:
- price for the given time
-
loadInstanceInfoTable
public HashMap<String,CloudInstance> loadInstanceInfoTable(String instanceTablePath) throws IOException
Performs read of csv file filled with VM instance characteristics. Each record in the csv should carry the following information (including header):- API_Name - naming for VM instance used by the provider
- Memory - floating number for the instance memory in GBs
- vCPUs - number of physical threads
- gFlops - FLOPS capability of the CPU in GFLOPS (Giga)
- ramSpeed - memory bandwidth in MB/s
- diskSpeed - memory bandwidth in MB/s
- networkSpeed - memory bandwidth in MB/s
- Price - price for instance per hour
- Parameters:
instanceTablePath
- csv file- Returns:
- map with filtered instances
- Throws:
IOException
- in case problem at reading the csv file
-
-