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

java.lang.Object
  extended by edu.isi.pegasus.planner.selector.site.Abstract
      extended by edu.isi.pegasus.planner.selector.site.Group
All Implemented Interfaces:
SiteSelector

public class Group
extends Abstract

A site selector than ends up doing grouping jobs together on the basis of an identifier specifed in the dax for the jobs, and schedules them on to the same site. Currently, the identifier is key group in the pegasus profile namespace. All the jobs that do not have a group associated with them are put in one default group and end up being scheduled on the same pool. A limitation of this site selector is that it does not check whether all the jobs can be scheduled on a particular pool or not. It just checks whether the first job can be or not. The reason for that is after the grouping the the selector just hands the first job in each group to the other site selectors that work on jobs. Currently, it hands it to the Random Site Selector. In the DAX, a job tagged with groups will look as follows

 
    group-1
    -a top -T 6  -i   -o  
    
    
 
 

Version:
$Revision: 2590 $
Author:
Karan Vahi, Gaurang Mehta, Mei-Hui Su

Field Summary
private static String mDefaultGroup
          The name of the group into which jobs are grouped if no group is specified in the dax.
private static String mDescription
          The description of the site selector.
private  Map mGroupMap
          The map containing the the jobs grouped by the key group.
private  AbstractPerJob mSelector
          The handle to the internal site selector that is used to schedule jobs amongst the groups.
 
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
Group()
          The default constructor.
 
Method Summary
 String description()
          Returns the description of the site selector.
 void initialize(PegasusBag bag)
          Initializes the site selector.
private  void insert(Job job)
          Inserts the job into the group map.
 void mapWorkflow(Graph workflow, List sites)
          The call out to map a list of jobs on to the execution pools.
 
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
 

Field Detail

mDescription

private static final String mDescription
The description of the site selector.

See Also:
Constant Field Values

mDefaultGroup

private static final String mDefaultGroup
The name of the group into which jobs are grouped if no group is specified in the dax.

See Also:
Constant Field Values

mGroupMap

private Map mGroupMap
The map containing the the jobs grouped by the key group.


mSelector

private AbstractPerJob mSelector
The handle to the internal site selector that is used to schedule jobs amongst the groups.

Constructor Detail

Group

public Group()
The default constructor.

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.

description

public String description()
Returns the description of the site selector.

Returns:
description.

mapWorkflow

public void mapWorkflow(Graph workflow,
                        List sites)
The call out to map a list of jobs on to the execution pools. A default implementation is provided that internally calls mapJob2ExecPool(Job, String,String,String) to map each of the jobs sequentially to an execution site. The reason for this method is to support site selectors that make their decision on a group of jobs i.e use backtracking to reach a good decision. The implementation that calls out to an executable using Runtime does not implement this method, but relies on the default implementation defined here.

Parameters:
workflow - the workflow that needs to be scheduled.
sites - the list of String objects representing the execution pools that can be used.

insert

private void insert(Job job)
Inserts the job into the group map.

Parameters:
job - the job to be inserted.


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