edu.isi.pegasus.planner.selector.site
public class Group extends Abstract
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>
Modifier and Type | Field and Description |
---|---|
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.
|
mBag, mLogger, mProps, mSiteStore, mTCMapper
SITE_NOT_FOUND, VERSION
Constructor and Description |
---|
Group()
The default constructor.
|
Modifier and Type | Method and Description |
---|---|
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.
|
mapWorkflow
private static final String mDescription
private static final String mDefaultGroup
private Map mGroupMap
private AbstractPerJob mSelector
public void initialize(PegasusBag bag)
initialize
in interface SiteSelector
initialize
in class Abstract
bag
- the bag of objects that is useful for initialization.public String description()
public void mapWorkflow(Graph workflow, List sites)
workflow
- the workflow that needs to be scheduled.sites
- the list of String
objects representing the
execution pools that can be used.private void insert(Job job)
job
- the job to be inserted.