be.ac.ua.broker.allocation.spot
Class SpotAllocator

java.lang.Object
  extended by be.ac.ua.broker.allocation.spot.SpotAllocator

public class SpotAllocator
extends java.lang.Object

This class is used during the resource allocation phase of the broker, when an instance is tagged as a spot instance to determine the appropriate scheduling for the task parts that were assigned to the instance. The bid price is determined using the spot model implementation, or using the actual spot prices when this option is enabled. The spot prices are also set in this class, they are requested from the spot history input files using the date and time information of the schedule.

Author:
Vermeersch Kurt

Constructor Summary
SpotAllocator(SchedulerResult schedulerResult, boolean useWorkloadModel1, java.util.Date start, java.util.Date end)
          Constructor for SpotAllocator
 
Method Summary
 ScheduledTaskCollection determinePrices(java.lang.String version, ScheduledTaskCollection scheduledTaskCollection)
          Determine the schedule that costs the least and set the actual spot prices of each task hour.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SpotAllocator

public SpotAllocator(SchedulerResult schedulerResult,
                     boolean useWorkloadModel1,
                     java.util.Date start,
                     java.util.Date end)
Constructor for SpotAllocator

Parameters:
schedulerResult - the original schedulerResult
useWorkloadModel1 - whether workload model 1 is being used
start - the start date of the schedule
end - the deadline of the scheduleF
Method Detail

determinePrices

public ScheduledTaskCollection determinePrices(java.lang.String version,
                                               ScheduledTaskCollection scheduledTaskCollection)
                                        throws InstanceNotAvailableException,
                                               InvalidInputException
Determine the schedule that costs the least and set the actual spot prices of each task hour.

Parameters:
version - the allocation scheme option to use
scheduledTaskCollection - the original schedule
Returns:
the updated schedule
Throws:
InstanceNotAvailableException
InvalidInputException