be.ac.ua.broker.input.tasks.generation.wm1
Class TaskHoursGenerator

java.lang.Object
  extended by be.ac.ua.broker.input.tasks.generation.wm1.TaskHoursGenerator

public class TaskHoursGenerator
extends java.lang.Object

This class is used to generate a workload model one 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" 8000 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 and whether or not the task is allowed to be run on spot instances.

Author:
Vermeersch Kurt

Field Summary
static java.lang.String DEFAULT_OUTPUT_FOLDER
          The location to store the description file of the generated workload model one 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.
 
Constructor Summary
TaskHoursGenerator(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 spotAllowed)
          Constructor for TaskHoursGenerator.
 
Method Summary
 java.lang.String[] getArrayDescription()
           
static void main(java.lang.String[] args)
          The TaskHoursGenerator is used to generate task description files of tasks that use workload model one.
 
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 one tasks


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_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

TaskHoursGenerator

public TaskHoursGenerator(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 spotAllowed)
Constructor for TaskHoursGenerator.

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
spotAllowed - whether the task is allowed to be run on spot instances.
Method Detail

main

public static void main(java.lang.String[] args)
The TaskHoursGenerator is used to generate task description files of tasks that use workload model one. A possible program argument array is: 'task1 descr "Micro - Micro" "EU - Ireland" "Linux/Unix" "2011-11-11 00:00" 3600 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, 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