Class Random
- java.lang.Object
-
- edu.isi.pegasus.planner.selector.site.Abstract
-
- edu.isi.pegasus.planner.selector.site.AbstractPerJob
-
- edu.isi.pegasus.planner.selector.site.Random
-
- All Implemented Interfaces:
SiteSelector
public class Random extends AbstractPerJob
A random site selector that maps to a job to a random pool, amongst the subset of pools where that particular job can be executed.- Version:
- $Revision$
- Author:
- Karan Vahi
-
-
Field Summary
-
Fields inherited from class edu.isi.pegasus.planner.selector.site.Abstract
mBag, mLogger, mProps, mSiteStore, mTCMapper
-
Fields inherited from interface edu.isi.pegasus.planner.selector.SiteSelector
SITE_NOT_FOUND, VERSION
-
-
Constructor Summary
Constructors Constructor Description Random()
The default constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
description()
Returns a brief description of the site selection technique being used.void
initialize(edu.isi.pegasus.planner.classes.PegasusBag bag)
Initializes the site selector.void
mapJob(edu.isi.pegasus.planner.classes.Job job, java.util.List sites)
Maps a job in the workflow to an execution site.private java.lang.String
selectRandomSite(java.util.List sites)
The random selection that selects randomly one of the records returned by the transformation catalog.-
Methods inherited from class edu.isi.pegasus.planner.selector.site.AbstractPerJob
mapWorkflow
-
-
-
-
Method Detail
-
initialize
public void initialize(edu.isi.pegasus.planner.classes.PegasusBag bag)
Initializes the site selector.- Specified by:
initialize
in interfaceSiteSelector
- Overrides:
initialize
in classAbstract
- Parameters:
bag
- the bag of objects that is useful for initialization.
-
mapJob
public void mapJob(edu.isi.pegasus.planner.classes.Job job, java.util.List sites)
Maps a job in the workflow to an execution site.- Specified by:
mapJob
in classAbstractPerJob
- Parameters:
job
- the job to be mapped.sites
- the list ofString
objects representing the execution sites that can be used.
-
description
public java.lang.String description()
Returns a brief description of the site selection technique being used.- Returns:
- String
-
selectRandomSite
private java.lang.String selectRandomSite(java.util.List sites)
The random selection that selects randomly one of the records returned by the transformation catalog.- Parameters:
sites
- List ofString
objects.- Returns:
- String
-
-