be.ac.ua.broker.evaluation
Class RandomWorkloadGenerator

java.lang.Object
  extended by be.ac.ua.broker.evaluation.RandomWorkloadGenerator

public class RandomWorkloadGenerator
extends java.lang.Object

Class used to generate semi-random tasks that make up the workload for a benchmark run, semi in the sense that certain variables can be set and certain properties are not random but take a certain value with a given probability.

Author:
Vermeersch Kurt

Constructor Summary
RandomWorkloadGenerator(java.lang.String fOLDERWM1, java.lang.String fOLDERWM2, java.util.Date start, java.lang.Double pROBABILITYSPOTALLOWEDTASK, java.lang.Double pROBABILITYLATEDEADLINETASK)
          Constructor for RandomWorkloadGenerator
 
Method Summary
 java.lang.String[] addRandomWM1Task(java.lang.String reg, java.lang.String inst, java.lang.String os)
          Add a randomly generated workload model one task to the existing workload.
 java.lang.String[] addRandomWM2Task(java.lang.String reg, java.lang.String inst, java.lang.String os)
          Add a randomly generated workload model two task to the existing workload.
 java.lang.String[] modifyCurrentWM1Task(java.lang.String reg, java.lang.String inst, java.lang.String os)
          Modify the randomly generated workload model one task corresponding to the current task number, it will get a new deadline and task length assigned.
 java.lang.String[] modifyCurrentWM2Task(java.lang.String reg, java.lang.String inst, java.lang.String os)
          Modify the randomly generated workload model two task corresponding to the current task number, it will get a new deadline, task length, and load distribution assigned.
 void reset()
          Reset the generator, start renumbering the generated tasks.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RandomWorkloadGenerator

public RandomWorkloadGenerator(java.lang.String fOLDERWM1,
                               java.lang.String fOLDERWM2,
                               java.util.Date start,
                               java.lang.Double pROBABILITYSPOTALLOWEDTASK,
                               java.lang.Double pROBABILITYLATEDEADLINETASK)
Constructor for RandomWorkloadGenerator

Parameters:
fOLDERWM1 - the location for the workload model one tasks
fOLDERWM2 - the location for the workload model two tasks
start - the start date of the one-year period in which the generated tasks will be scheduled
pROBABILITYSPOTALLOWEDTASK - probability the generated task is allowed to be run on spot instances
pROBABILITYLATEDEADLINETASK - probability the generated task has a deadline falling in the last week of the one-year scheduling period.
Method Detail

reset

public void reset()
Reset the generator, start renumbering the generated tasks.


addRandomWM1Task

public java.lang.String[] addRandomWM1Task(java.lang.String reg,
                                           java.lang.String inst,
                                           java.lang.String os)
Add a randomly generated workload model one task to the existing workload.

Parameters:
reg - the geographical region to generate a task for
inst - the instance type to generate a task for
os - the operating system to generate a task for
Returns:
the string array description of the generated task

addRandomWM2Task

public java.lang.String[] addRandomWM2Task(java.lang.String reg,
                                           java.lang.String inst,
                                           java.lang.String os)
Add a randomly generated workload model two task to the existing workload.

Parameters:
reg - the geographical region to generate a task for
inst - the instance type to generate a task for
os - the operating system to generate a task for
Returns:
the string array description of the generated task

modifyCurrentWM1Task

public java.lang.String[] modifyCurrentWM1Task(java.lang.String reg,
                                               java.lang.String inst,
                                               java.lang.String os)
Modify the randomly generated workload model one task corresponding to the current task number, it will get a new deadline and task length assigned.

Parameters:
reg - the geographical region of the generated task
inst - the instance type of the generated task
os - the operating system of the generated task
Returns:
the string array description of the modified task

modifyCurrentWM2Task

public java.lang.String[] modifyCurrentWM2Task(java.lang.String reg,
                                               java.lang.String inst,
                                               java.lang.String os)
Modify the randomly generated workload model two task corresponding to the current task number, it will get a new deadline, task length, and load distribution assigned.

Parameters:
reg - the geographical region of the generated task
inst - the instance type of the generated task
os - the operating system of the generated task
Returns:
the string array description of the modified task