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
AdjustableLoadProfileEstimatorimplementation.
-
-
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 LoadProfileestimate(EstimationContext estimationContext)Estimates aLoadProfile.java.lang.StringgetConfigurationKey()Retrieve theConfigurationkey for this instance.java.util.Collection<Variable>getEmployedVariables()java.util.Collection<LoadProfileEstimator>getNestedEstimators()Retrieve nested instances.voidnest(LoadProfileEstimator loadProfileEstimator)Nest a sub-instance.java.lang.StringtoJsonConfig(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 inputCardinalityEstimates to the new instancenumOutputs- the number of outputCardinalityEstimates to the new instancecpuEstimator- aDynamicLoadEstimatorto 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 inputCardinalityEstimates to the new instancenumOutputs- the number of outputCardinalityEstimates to the new instancecpuEstimator- aDynamicLoadEstimatorto estimate CPU loaddiskEstimator- aDynamicLoadEstimatorto estimate disk loadnetworkEstimator- aDynamicLoadEstimatorto estimate network load
-
-
Method Detail
-
estimate
public LoadProfile estimate(EstimationContext estimationContext)
Description copied from interface:LoadProfileEstimatorEstimates aLoadProfile.- Specified by:
estimatein interfaceLoadProfileEstimator- Parameters:
estimationContext- provides parameters for the estimation- Returns:
- the
LoadProfile
-
nest
public void nest(LoadProfileEstimator loadProfileEstimator)
Description copied from interface:LoadProfileEstimatorNest a sub-instance.- Specified by:
nestin interfaceLoadProfileEstimator- Parameters:
loadProfileEstimator- the sub-instance
-
getNestedEstimators
public java.util.Collection<LoadProfileEstimator> getNestedEstimators()
Description copied from interface:LoadProfileEstimatorRetrieve nested instances.- Specified by:
getNestedEstimatorsin interfaceLoadProfileEstimator- Returns:
- the nested instances
-
getConfigurationKey
public java.lang.String getConfigurationKey()
Description copied from interface:LoadProfileEstimatorRetrieve theConfigurationkey for this instance.- Specified by:
getConfigurationKeyin interfaceLoadProfileEstimator- Returns:
- the key or
nullif 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()
-
-