edu.isi.pegasus.planner.selector.site
Class Random

java.lang.Object
  extended by edu.isi.pegasus.planner.selector.site.Abstract
      extended by edu.isi.pegasus.planner.selector.site.AbstractPerJob
          extended by 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: 2590 $
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
Random()
          The default constructor.
 
Method Summary
 String description()
          Returns a brief description of the site selection technique being used.
 void initialize(PegasusBag bag)
          Initializes the site selector.
 void mapJob(Job job, List sites)
          Maps a job in the workflow to an execution site.
private  String selectRandomSite(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
 
Methods inherited from class edu.isi.pegasus.planner.selector.site.Abstract
mapWorkflow
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Random

public Random()
The default constructor. Should not be called. Call the overloaded one.

Method Detail

initialize

public void initialize(PegasusBag bag)
Initializes the site selector.

Specified by:
initialize in interface SiteSelector
Overrides:
initialize in class Abstract
Parameters:
bag - the bag of objects that is useful for initialization.

mapJob

public void mapJob(Job job,
                   List sites)
Maps a job in the workflow to an execution site.

Specified by:
mapJob in class AbstractPerJob
Parameters:
job - the job to be mapped.
sites - the list of String objects representing the execution sites that can be used.

description

public String description()
Returns a brief description of the site selection technique being used.

Returns:
String

selectRandomSite

private String selectRandomSite(List sites)
The random selection that selects randomly one of the records returned by the transformation catalog.

Parameters:
sites - List of Stringobjects.
Returns:
String


Copyright © 2011 The University of Southern California. All Rights Reserved.