edu.isi.pegasus.planner.cluster
public abstract class Abstract extends Object implements Clusterer
| Modifier and Type | Field and Description |
|---|---|
protected Collection |
mClusteredRelations
The collection of relations, that is constructed for the clustered
workflow.
|
protected JobAggregatorInstanceFactory |
mJobAggregatorFactory
The handle to the job aggregator factory.
|
protected LogManager |
mLogger
The handle to the logger object.
|
protected Map |
mPartitionClusterMap
A Map that indexes the partition ID to the name of clustered job.
|
protected PegasusProperties |
mProps
The handle to the properties object holding all the properties.
|
protected ADag |
mScheduledDAG
ADag object containing the jobs that have been scheduled by the site
selector.
|
protected Map |
mSubInfoMap
A Map to store all the job(Job) objects indexed by their logical ID found in
the dax.
|
| Constructor and Description |
|---|
Abstract()
The Abstract constructor.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
addJob(Job job)
Adds jobs to the internal map of jobs that is maintained by the clusterer.
|
protected void |
associate(Partition p,
Job job)
Maps the partition to the corresponding clustered job.
|
protected Job |
clusteredJob(Partition p)
Returns the job corresponding to a partition.
|
protected Job |
clusteredJob(String id)
Returns the job corresponding to a partition.
|
protected String |
constructClusteredJobID(Partition partition)
Returns the ID for the clustered job corresponding to a partition.
|
void |
determineClusters(Partition partition)
It creates a single clustered job for the partition.
|
abstract void |
determineInputOutputFiles(AggregatedJob job,
List<Job> orderedJobs)
Determine the input and output files of the job on the basis of the
order of the constituent jobs in the AggregatedJob.
|
ADag |
getClusteredDAG()
Returns the clustered workflow.
|
protected Job |
getJob(String id)
Returns the job object corresponding to the id of the job.
|
protected String |
getLogicalNameForJobs(List<Job> jobs)
Returns the logical names for the jobs.
|
void |
initialize(ADag dag,
PegasusBag bag)
Initializes the Clusterer impelementation
|
abstract List<String> |
order(Partition p)
Returns the nodes in the partition as a List in a particular order.
|
void |
parents(String partitionID,
List parents)
Associates the relations between the partitions with the corresponding
relations between the clustered jobs that are created for each Partition.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitdescriptionprotected Map mSubInfoMap
protected Map mPartitionClusterMap
protected LogManager mLogger
protected PegasusProperties mProps
protected JobAggregatorInstanceFactory mJobAggregatorFactory
protected Collection mClusteredRelations
protected ADag mScheduledDAG
public abstract List<String> order(Partition p) throws ClustererException
p - the partition whose nodes have to be ordered.String objects that are the ID's
of the nodes.ClustererException - in case of error.public abstract void determineInputOutputFiles(AggregatedJob job, List<Job> orderedJobs)
job - the AggregatedJoborderedJobs - the List of Jobs that is ordered as determined by the clustererrClustererException - in case of error.public void initialize(ADag dag, PegasusBag bag) throws ClustererException
initialize in interface Clustererdag - the workflow that is being clustered.bag - the bag of objects that is useful for initialization.ClustererException - in case of error.public void determineClusters(Partition partition) throws ClustererException
determineClusters in interface Clustererpartition - the partition for which the clusters need to be
determined.ClustererException - if the clustering executable is not installed
on the remote site or if all the jobs in the partition are not
scheduled on the same site.protected String getLogicalNameForJobs(List<Job> jobs)
jobs - List of jobspublic void parents(String partitionID, List parents) throws ClustererException
parents in interface ClustererpartitionID - the id of a partition.parents - the list of String objects that contain
the id's of the parents of the partition.ClustererException - in case of clustered job not being found for a partition.public ADag getClusteredDAG() throws ClustererException
getClusteredDAG in interface ClustererADag object corresponding to the clustered workflow.ClustererException - in case of error.protected String constructClusteredJobID(Partition partition)
partition - the partition.protected void addJob(Job job)
job - the job being addedprotected Job getJob(String id)
id - the id of the jobprotected void associate(Partition p, Job job)
p - the partition being clustered.job - the corresponding clustered job.protected Job clusteredJob(Partition p)
p - the partition for which the clustered job is reqd.