be.ac.ua.broker.input.tasks.generation.wm2
Class TaskGenerator

java.lang.Object
  extended by be.ac.ua.broker.input.tasks.generation.wm2.TaskGenerator

public class TaskGenerator
extends java.lang.Object

This class is used to generate a workload model two task that uses the specification provided using the program arguments. A possible program argument array is: 'task1 descr "Micro - Micro" "EU - Ireland" "Linux/Unix" "2011-11-11 00:00" 3600 workload1 false'. We first provide a desired name and description for the task, followed by information about the instance the task has to run on: the instance type, the geographical region and the operating system. We also provide the deadline of the task, the length of the task in hours, a name associated with the randomly generated workload created for the task and whether or not the task is allowed to be run on spot instances.

Author:
Vermeersch Kurt

Field Summary
static java.lang.String COMPUTE_INSTANCE_INPUT_FILE
          The location of the file that contains the mapping information from the supported EC2 instance types to the associated number of compute units.
static java.lang.String DEFAULT_OUTPUT_FOLDER
          The location to store the description file of the generated workload model two tasks
static java.lang.String TASK_DEADLINE
          Tag name used for the deadline of the task.
static java.lang.String TASK_DESCRIPTION
          Tag name used for the description of the task.
static java.lang.String TASK_INSTANCE
          Tag name used for the instance type of the instance the task has to run on.
static java.lang.String TASK_LENGTH
          Tag name used for the length (in hours) of the task.
static java.lang.String TASK_NAME
          Tag name used for the name of the task.
static java.lang.String TASK_OS
          Tag name used for the operating system of the instance the task has to run on.
static java.lang.String TASK_REGION
          Tag name used for the geographical region of the instance the task has to run on.
static java.lang.String TASK_SPOT
          Tag name used for the fact whether the task is allowed to be run on spot instances.
static java.lang.String TASK_WORKLOAD
          Tag name used for the file in which the generated workload distribution of the task is stored.
 
Constructor Summary
TaskGenerator(java.lang.String outputFolder, java.lang.String taskName, java.lang.String taskDescription, java.lang.String taskInstance, java.lang.String taskRegion, java.lang.String taskOS, java.lang.String taskDeadline, java.lang.String taskLength, java.lang.String taskWorkload, java.lang.String spotAllowed)
          Constructor for TaskGenerator.
 
Method Summary
 java.lang.String[] getArrayDescription()
           
static void main(java.lang.String[] args)
          The TaskGenerator is used to generate task description files of tasks that use workload model two.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_OUTPUT_FOLDER

public static java.lang.String DEFAULT_OUTPUT_FOLDER
The location to store the description file of the generated workload model two tasks


COMPUTE_INSTANCE_INPUT_FILE

public static java.lang.String COMPUTE_INSTANCE_INPUT_FILE
The location of the file that contains the mapping information from the supported EC2 instance types to the associated number of compute units.


TASK_NAME

public static java.lang.String TASK_NAME
Tag name used for the name of the task.


TASK_DESCRIPTION

public static java.lang.String TASK_DESCRIPTION
Tag name used for the description of the task.


TASK_INSTANCE

public static java.lang.String TASK_INSTANCE
Tag name used for the instance type of the instance the task has to run on.


TASK_REGION

public static java.lang.String TASK_REGION
Tag name used for the geographical region of the instance the task has to run on.


TASK_OS

public static java.lang.String TASK_OS
Tag name used for the operating system of the instance the task has to run on.


TASK_DEADLINE

public static java.lang.String TASK_DEADLINE
Tag name used for the deadline of the task.


TASK_LENGTH

public static java.lang.String TASK_LENGTH
Tag name used for the length (in hours) of the task.


TASK_WORKLOAD

public static java.lang.String TASK_WORKLOAD
Tag name used for the file in which the generated workload distribution of the task is stored.


TASK_SPOT

public static java.lang.String TASK_SPOT
Tag name used for the fact whether the task is allowed to be run on spot instances.

Constructor Detail

TaskGenerator

public TaskGenerator(java.lang.String outputFolder,
                     java.lang.String taskName,
                     java.lang.String taskDescription,
                     java.lang.String taskInstance,
                     java.lang.String taskRegion,
                     java.lang.String taskOS,
                     java.lang.String taskDeadline,
                     java.lang.String taskLength,
                     java.lang.String taskWorkload,
                     java.lang.String spotAllowed)
Constructor for TaskGenerator.

Parameters:
outputFolder - the location for the task description file created for the generated task
taskName - the name of the task
taskDescription - the description of the task
taskInstance - the instance type of the instance the task has to run on.
taskRegion - the geographical region of the instance the task has to run on.
taskOS - the operating system of the instance the task has to run on.
taskDeadline - the deadline of the task
taskLength - the length in hours of the task
taskWorkload - the file in which the generated workload distribution of the task has to be stored.
spotAllowed - whether the task is allowed to be run on spot instances.
Method Detail

main

public static void main(java.lang.String[] args)
The TaskGenerator is used to generate task description files of tasks that use workload model two. A possible program argument array is: 'task1 descr "Micro - Micro" "EU - Ireland" "Linux/Unix" "2011-11-11 00:00" 3600 workload1 false'. We first provide a desired name and description for the task, followed by information about the instance the task has to run on: the instance type, the geographical region and the operating system. We also provide the deadline of the task, the length of the task in hours, a name associated with the randomly generated workload created for the task and whether or not the task is allowed to be run on spot instances.

Parameters:
args - program arguments

getArrayDescription

public java.lang.String[] getArrayDescription()
Returns:
an array description of the generated task