Class Group
java.lang.Object
edu.isi.pegasus.planner.selector.site.Abstract
edu.isi.pegasus.planner.selector.site.Group
- All Implemented Interfaces:
SiteSelector
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
<job id="ID000001" namespace="pegasus" name="preprocess" version="1.0" level="3">
<profile namespace="pegasus" key="group">group-1</profile>
<argument>-a top -T 6 -i <filename file="f.a"/> -o <filename file="f.b"/> </argument>
<uses file="f.a" link="input" register="false" transfer="true" type="data"/>
<uses file="f.b" link="output" register="true" transfer="true" type="data"/>
</job>
- Version:
- $Revision$
- Author:
- Karan Vahi, Gaurang Mehta, Mei-Hui Su
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final String
The name of the group into which jobs are grouped if no group is specified in the dax.private static final String
The description of the site selector.private Map
The map containing the the jobs grouped by the key group.private AbstractPerJob
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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the description of the site selector.void
initialize
(edu.isi.pegasus.planner.classes.PegasusBag bag) Initializes the site selector.private void
insert
(edu.isi.pegasus.planner.classes.Job job) Inserts the job into the group map.void
mapWorkflow
(edu.isi.pegasus.planner.classes.ADag workflow, List sites) The call out to map a list of jobs on to the execution pools.
-
Field Details
-
mDescription
The description of the site selector.- See Also:
-
mDefaultGroup
The name of the group into which jobs are grouped if no group is specified in the dax.- See Also:
-
mGroupMap
The map containing the the jobs grouped by the key group. -
mSelector
The handle to the internal site selector that is used to schedule jobs amongst the groups.
-
-
Constructor Details
-
Group
public Group()The default constructor.
-
-
Method Details
-
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.
-
description
Returns the description of the site selector.- Returns:
- description.
-
mapWorkflow
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 ofString
objects representing the execution pools that can be used.
-
insert
private void insert(edu.isi.pegasus.planner.classes.Job job) Inserts the job into the group map.- Parameters:
job
- the job to be inserted.
-