Package org.apache.wayang.profiler.log
Class DynamicLoadProfileEstimator
- java.lang.Object
-
- org.apache.wayang.profiler.log.DynamicLoadProfileEstimator
-
- All Implemented Interfaces:
LoadProfileEstimator
public class DynamicLoadProfileEstimator extends java.lang.Object implements LoadProfileEstimator
AdjustableLoadProfileEstimator
implementation.
-
-
Constructor Summary
Constructors Constructor Description DynamicLoadProfileEstimator(java.lang.String configKey, int numInputs, int numOutputs, DynamicLoadEstimator cpuEstimator)
Creates a new instance.DynamicLoadProfileEstimator(java.lang.String configKey, int numInputs, int numOutputs, DynamicLoadEstimator cpuEstimator, DynamicLoadEstimator diskEstimator, DynamicLoadEstimator networkEstimator)
Creates a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description LoadProfile
estimate(EstimationContext estimationContext)
Estimates aLoadProfile
.java.lang.String
getConfigurationKey()
Retrieve theConfiguration
key for this instance.java.util.Collection<Variable>
getEmployedVariables()
java.util.Collection<LoadProfileEstimator>
getNestedEstimators()
Retrieve nested instances.void
nest(LoadProfileEstimator loadProfileEstimator)
Nest a sub-instance.java.lang.String
toJsonConfig(Individual individual)
Creates a JSON representation of this instance that can be plugged into a properties file.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.wayang.core.optimizer.costs.LoadProfileEstimator
copy, getConfigurationKeys, getTemplateKey, getTemplateKeys
-
-
-
-
Constructor Detail
-
DynamicLoadProfileEstimator
public DynamicLoadProfileEstimator(java.lang.String configKey, int numInputs, int numOutputs, DynamicLoadEstimator cpuEstimator)
Creates a new instance.- Parameters:
numInputs
- the number of inputCardinalityEstimate
s to the new instancenumOutputs
- the number of outputCardinalityEstimate
s to the new instancecpuEstimator
- aDynamicLoadEstimator
to estimate CPU load
-
DynamicLoadProfileEstimator
public DynamicLoadProfileEstimator(java.lang.String configKey, int numInputs, int numOutputs, DynamicLoadEstimator cpuEstimator, DynamicLoadEstimator diskEstimator, DynamicLoadEstimator networkEstimator)
Creates a new instance.- Parameters:
configKey
- with which this instance should be associated in aConfiguration
.numInputs
- the number of inputCardinalityEstimate
s to the new instancenumOutputs
- the number of outputCardinalityEstimate
s to the new instancecpuEstimator
- aDynamicLoadEstimator
to estimate CPU loaddiskEstimator
- aDynamicLoadEstimator
to estimate disk loadnetworkEstimator
- aDynamicLoadEstimator
to estimate network load
-
-
Method Detail
-
estimate
public LoadProfile estimate(EstimationContext estimationContext)
Description copied from interface:LoadProfileEstimator
Estimates aLoadProfile
.- Specified by:
estimate
in interfaceLoadProfileEstimator
- Parameters:
estimationContext
- provides parameters for the estimation- Returns:
- the
LoadProfile
-
nest
public void nest(LoadProfileEstimator loadProfileEstimator)
Description copied from interface:LoadProfileEstimator
Nest a sub-instance.- Specified by:
nest
in interfaceLoadProfileEstimator
- Parameters:
loadProfileEstimator
- the sub-instance
-
getNestedEstimators
public java.util.Collection<LoadProfileEstimator> getNestedEstimators()
Description copied from interface:LoadProfileEstimator
Retrieve nested instances.- Specified by:
getNestedEstimators
in interfaceLoadProfileEstimator
- Returns:
- the nested instances
-
getConfigurationKey
public java.lang.String getConfigurationKey()
Description copied from interface:LoadProfileEstimator
Retrieve theConfiguration
key for this instance.- Specified by:
getConfigurationKey
in interfaceLoadProfileEstimator
- Returns:
- the key or
null
if none
-
toJsonConfig
public java.lang.String toJsonConfig(Individual individual)
Creates a JSON representation of this instance that can be plugged into a properties file.- Parameters:
individual
- provides parameterization of this instance- Returns:
- the JSON configuration representation
-
getEmployedVariables
public java.util.Collection<Variable> getEmployedVariables()
-
-