org.griphyn.cPlanner.cluster.aggregator
Class Abstract

java.lang.Object
  extended byorg.griphyn.cPlanner.cluster.aggregator.Abstract
All Implemented Interfaces:
JobAggregator
Direct Known Subclasses:
MPIExec, SeqExec

public abstract class Abstract
extends Object
implements JobAggregator

An abstract implementation of the JobAggregator interface, which the other implementations can choose to extend.

Version:
$Revision: 1.6 $
Author:
Karan Vahi vahi@isi.edu

Field Summary
static String FAT_JOB_PREFIX
          The prefix that is assigned to the jobname of the collapsed jobs to get the jobname for the fat job.
protected  ADag mClusteredADag
          The handle to the ADag object that contains the workflow being clustered.
protected  String mDirectory
          The directory, where the stdin file of the fat jobs are created.
protected  GridStartFactory mGridStartFactory
          The handle to the GridStart Factory.
protected  LogManager mLogger
          The handle to the LogManager that logs all the messages.
protected  PegasusProperties mProps
          The object holding all the properties pertaining to Pegasus.
protected  PoolInfoProvider mSiteHandle
          Handle to the site catalog.
protected  TransformationCatalog mTCHandle
          The handle to the transformation catalog.
 
Fields inherited from interface org.griphyn.cPlanner.cluster.JobAggregator
VERSION
 
Constructor Summary
Abstract(PegasusProperties properties, String submitDir, ADag dag)
          The overloaded constructor, that is called by load method.
 
Method Summary
abstract  String aggregatedJobArguments(AggregatedJob job)
          Returns the arguments with which the AggregatedJob needs to be invoked with.
 AggregatedJob construct(List jobs, String name, String id)
          Constructs a new aggregated job that contains all the jobs passed to it.
protected  AggregatedJob construct(List jobs, String name, String id, String mergeLFN)
          Constructs a new aggregated job that contains all the jobs passed to it.
protected  boolean entryNotInTC(String namespace, String name, String version, String site)
          Determines whether there is NOT an entry in the transformation catalog for a particular transformation on a particular site.
protected  TransformationCatalogEntry getTCEntry(SubInfo job)
          Helper method to get an entry from the transformation catalog for an installed executable.
protected  void setDirectory(String directory)
          Sets the directory where the stdin files are to be generated.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.griphyn.cPlanner.cluster.JobAggregator
abortOnFristJobFailure, entryNotInTC, getCollapserLFN, setAbortOnFirstJobFailure
 

Field Detail

FAT_JOB_PREFIX

public static final String FAT_JOB_PREFIX
The prefix that is assigned to the jobname of the collapsed jobs to get the jobname for the fat job.

See Also:
Constant Field Values

mDirectory

protected String mDirectory
The directory, where the stdin file of the fat jobs are created. It should be the submit file directory that the user mentions at runtime.


mProps

protected PegasusProperties mProps
The object holding all the properties pertaining to Pegasus.


mLogger

protected LogManager mLogger
The handle to the LogManager that logs all the messages.


mTCHandle

protected TransformationCatalog mTCHandle
The handle to the transformation catalog.


mSiteHandle

protected PoolInfoProvider mSiteHandle
Handle to the site catalog.


mClusteredADag

protected ADag mClusteredADag
The handle to the ADag object that contains the workflow being clustered.


mGridStartFactory

protected GridStartFactory mGridStartFactory
The handle to the GridStart Factory.

Constructor Detail

Abstract

public Abstract(PegasusProperties properties,
                String submitDir,
                ADag dag)
The overloaded constructor, that is called by load method.

Parameters:
properties - the PegasusProperties object containing all the properties required by Pegasus.
submitDir - the submit directory where the submit file for the job has to be generated.
dag - the workflow that is being clustered.
See Also:
JobAggregatorFactory.loadInstance(String,PegasusProperties,String,ADag)
Method Detail

aggregatedJobArguments

public abstract String aggregatedJobArguments(AggregatedJob job)
Returns the arguments with which the AggregatedJob needs to be invoked with.

Parameters:
job - the AggregatedJob for which the arguments have to be constructed.
Returns:
argument string

construct

public AggregatedJob construct(List jobs,
                               String name,
                               String id)
Constructs a new aggregated job that contains all the jobs passed to it. The new aggregated job, appears as a single job in the workflow and replaces the jobs it contains in the workflow.

Specified by:
construct in interface JobAggregator
Parameters:
jobs - the list of SubInfo objects that need to be collapsed. All the jobs being collapsed should be scheduled at the same pool, to maintain correct semantics.
name - the logical name of the jobs in the list passed to this function.
id - the id that is given to the new job.
Returns:
the SubInfo object corresponding to the aggregated job containing the jobs passed as List in the input, null if the list of jobs is empty

construct

protected AggregatedJob construct(List jobs,
                                  String name,
                                  String id,
                                  String mergeLFN)
Constructs a new aggregated job that contains all the jobs passed to it. The new aggregated job, appears as a single job in the workflow and replaces the jobs it contains in the workflow.

Parameters:
jobs - the list of SubInfo objects that need to be collapsed. All the jobs being collapsed should be scheduled at the same pool, to maintain correct semantics.
name - the logical name of the jobs in the list passed to this function.
id - the id that is given to the new job.
mergeLFN - the logical name for the aggregated job that has to be constructed.
Returns:
the AggregatedJob object corresponding to the aggregated job containing the jobs passed as List in the input, null if the list of jobs is empty

getTCEntry

protected TransformationCatalogEntry getTCEntry(SubInfo job)
Helper method to get an entry from the transformation catalog for an installed executable. It does the traversal from the list of entries to return a single TransformationCatalogEntry object, and dies with an appropriate error message if the object is not found. The pool and the name are retrieved from job object.

Parameters:
job - the job whose corresponding TransformationCatalogEntry you want.
Returns:
the TransformationCatalogEntry corresponding to the entry in the TC.

entryNotInTC

protected boolean entryNotInTC(String namespace,
                               String name,
                               String version,
                               String site)
Determines whether there is NOT an entry in the transformation catalog for a particular transformation on a particular site.

Parameters:
namespace - the logical namespace of the transformation.
name - the logical name of the transformation.
version - the version of the transformation.
site - the site at which existence check is required.
Returns:
boolean true if an entry does not exists, false otherwise.

setDirectory

protected void setDirectory(String directory)
Sets the directory where the stdin files are to be generated.

Parameters:
directory - the path to the directory to which it needs to be set.


Copyright © 2003 The University of Chicago and The University of Southern California. All Rights Reserved.