| java.lang.Object org.griphyn.cPlanner.selector.site.heft.Algorithm
Algorithm | public class Algorithm (Code) | | The HEFT based site selector. The runtime for the job in seconds is picked
from the pegasus profile key runtime in the transformation catalog for a
transformation.
The data communication costs between jobs if scheduled on different sites
is assumed to be fixed. Later on if required, the ability to specify this
value will be exposed via properties.
The number of processors in a site is picked by the attribute idle-nodes
associated with the vanilla jobmanager for a site in the site catalog.
author: Karan Vahi version: $Revision: 426 $ See Also: Algorithm.AVERAGE_BANDWIDTH See Also: Algorithm.RUNTIME_PROFILE_KEY See Also: Algorithm.DEFAULT_NUMBER_OF_FREE_NODES See Also: Algorithm.AVERAGE_DATA_SIZE_BETWEEN_JOBS See Also: org.griphyn.cPlanner.classes.JobManager.IDLE_NODES |
Method Summary | |
protected float | calculateAverageComputeTime(SubInfo job) Returns the average compute time in seconds for a job.
Parameters: job - the job whose average compute time is to be computed. | protected long[] | calculateEstimatedStartAndFinishTime(GraphNode node, String site) Estimates the start and finish time of a job on a site.
Parameters: node - the node that is being scheduled Parameters: site - the site for which the finish time is reqd. | protected float | computeDownwardRank(GraphNode node) Computes the downward rank of a node.
The downward rank of node i is
_ ___
max { rank( n ) + w + c }
j E pred( i ) d j j ji
Parameters: node - the GraphNode whose rank needs to be computed. | public String | description() This method returns a String describing the site selection technique
that is being implemented by the implementing class. | protected long | getAvailableTime(String site, long readyTime) Returns the available time for a site.
Parameters: site - the site at which you want to schedule the job. Parameters: readyTime - the time at which all the data reqd by the job will arrive at site. | protected int | getExpectedRuntime(SubInfo job, TransformationCatalogEntry entry) Return expected runtime.
Parameters: job - the job in the workflow. Parameters: entry - the TransformationCatalogEntry object. | protected int | getExpectedRuntimeFromAC(SubInfo job, TransformationCatalogEntry entry) Return expected runtime from the AC only if the process catalog is
initialized. | protected int | getFreeNodesForSite(String site) Returns the freenodes for a site.
Parameters: site - the site identifier. | public long | getMakespan() Returns the makespan of the scheduled workflow. | protected ProcessCatalog | loadProcessCatalog(String type, Properties props) Load the process catalog, only if it is determined that the Transformation
Catalog description is the windward one.
Parameters: type - the type of process catalog Parameters: props - contains all necessary data to establish the link. | public String | mapJob2ExecPool(SubInfo job, List pools) The call out to the site selector to determine on what pool the job
should be scheduled.
Parameters: job - SubInfo the SubInfo object corresponding tothe job whose execution pool we want to determine. Parameters: pools - the list of String objects representing theexecution pools that can be used. | protected void | populateSiteMap(List sites) Populates the number of free nodes for each site, by querying the
Site Catalog. | public void | schedule(ADag dag, List sites) Schedules the workflow using the heft. | public void | schedule(Graph workflow, List sites) Schedules the workflow according to the HEFT algorithm. | protected void | scheduleJob(String site, long start, long end) Schedules a job to a site. |
AVERAGE_BANDWIDTH | final public static float AVERAGE_BANDWIDTH(Code) | | The average bandwidth between the sites. In mega bytes/per second.
|
AVERAGE_DATA_SIZE_BETWEEN_JOBS | final public static float AVERAGE_DATA_SIZE_BETWEEN_JOBS(Code) | | The average data that is transferred in between 2 jobs in the workflow.
In megabytes.
|
DEFAULT_NUMBER_OF_FREE_NODES | final public static int DEFAULT_NUMBER_OF_FREE_NODES(Code) | | The default number of nodes that are associated with a site if not found
in the site catalog.
|
MAXIMUM_FINISH_TIME | final public static long MAXIMUM_FINISH_TIME(Code) | | The maximum finish time possible for a job.
|
PROCESS_CATALOG_IMPL_PROPERTY | final public static String PROCESS_CATALOG_IMPL_PROPERTY(Code) | | The property that designates which Process catalog impl to pick up.
|
RUNTIME_PROFILE_KEY | final public static String RUNTIME_PROFILE_KEY(Code) | | The pegasus profile key that gives us the expected runtime.
|
mTCMapper | protected Mapper mTCMapper(Code) | | Handle to the TCMapper.
|
Algorithm | public Algorithm(PegasusBag bag)(Code) | | The default constructor.
Parameters: bag - the bag of Pegasus related objects. |
calculateAverageComputeTime | protected float calculateAverageComputeTime(SubInfo job)(Code) | | Returns the average compute time in seconds for a job.
Parameters: job - the job whose average compute time is to be computed. the weighted compute time in seconds. |
calculateEstimatedStartAndFinishTime | protected long[] calculateEstimatedStartAndFinishTime(GraphNode node, String site)(Code) | | Estimates the start and finish time of a job on a site.
Parameters: node - the node that is being scheduled Parameters: site - the site for which the finish time is reqd. long[0] the estimated start time.long[1] the estimated finish time. |
computeDownwardRank | protected float computeDownwardRank(GraphNode node)(Code) | | Computes the downward rank of a node.
The downward rank of node i is
_ ___
max { rank( n ) + w + c }
j E pred( i ) d j j ji
Parameters: node - the GraphNode whose rank needs to be computed. computed rank. |
description | public String description()(Code) | | This method returns a String describing the site selection technique
that is being implemented by the implementing class.
String |
getAvailableTime | protected long getAvailableTime(String site, long readyTime)(Code) | | Returns the available time for a site.
Parameters: site - the site at which you want to schedule the job. Parameters: readyTime - the time at which all the data reqd by the job will arrive at site. the available time of the site. |
getExpectedRuntime | protected int getExpectedRuntime(SubInfo job, TransformationCatalogEntry entry)(Code) | | Return expected runtime.
Parameters: job - the job in the workflow. Parameters: entry - the TransformationCatalogEntry object. the runtime in seconds. |
getExpectedRuntimeFromAC | protected int getExpectedRuntimeFromAC(SubInfo job, TransformationCatalogEntry entry)(Code) | | Return expected runtime from the AC only if the process catalog is
initialized.
Parameters: job - the job in the workflow. Parameters: entry - the TC entry the runtime in seconds. |
getFreeNodesForSite | protected int getFreeNodesForSite(String site)(Code) | | Returns the freenodes for a site.
Parameters: site - the site identifier. number of nodes |
getMakespan | public long getMakespan()(Code) | | Returns the makespan of the scheduled workflow. It is maximum of the
actual finish times for the leaves of the scheduled workflow.
long the makespan of the workflow. |
loadProcessCatalog | protected ProcessCatalog loadProcessCatalog(String type, Properties props)(Code) | | Load the process catalog, only if it is determined that the Transformation
Catalog description is the windward one.
Parameters: type - the type of process catalog Parameters: props - contains all necessary data to establish the link. true if connected now, or false to indicate a failure. |
mapJob2ExecPool | public String mapJob2ExecPool(SubInfo job, List pools)(Code) | | The call out to the site selector to determine on what pool the job
should be scheduled.
Parameters: job - SubInfo the SubInfo object corresponding tothe job whose execution pool we want to determine. Parameters: pools - the list of String objects representing theexecution pools that can be used. if the pool is found to which the job can be mapped, a stringof the form executionpool:jobmanager where thejobmanager can be null. If the pool is not found, then setpoolhandle to NONE. null - if some error occured . |
populateSiteMap | protected void populateSiteMap(List sites)(Code) | | Populates the number of free nodes for each site, by querying the
Site Catalog.
Parameters: sites - list of sites. |
schedule | public void schedule(ADag dag, List sites)(Code) | | Schedules the workflow using the heft.
Parameters: dag - the ADag object containing the abstract workflowthat needs to be mapped. Parameters: sites - the list of candidate sites where the workflow can potentiallyexecute. |
schedule | public void schedule(Graph workflow, List sites)(Code) | | Schedules the workflow according to the HEFT algorithm.
Parameters: workflow - the workflow that has to be scheduled. Parameters: sites - the list of candidate sites where the workflow can potentiallyexecute. |
scheduleJob | protected void scheduleJob(String site, long start, long end)(Code) | | Schedules a job to a site.
Parameters: site - the site at which to schedule Parameters: start - the start time for job Parameters: end - the end time of job |
|
|