public abstract class Abstract extends java.lang.Object implements JobAggregator
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CLUSTERED_JOB_PREFIX
The prefix that is assigned to the jobname of the collapsed jobs to
get the jobname for the fat job.
|
static java.lang.String |
DERIVATION_NAMESPACE
The derivation namespace for the cluster jobs.
|
static java.lang.String |
DERIVATION_VERSION
The version number for the derivations for cluster jobs.
|
protected PegasusBag |
mBag
Bag of initialization objects.
|
protected ADag |
mClusteredADag
The handle to the ADag object that contains the workflow being
clustered.
|
protected java.lang.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.
|
static java.lang.String |
MONITORD_COMMENT_MARKER
The marker to designate a line in the input file reserved for
monitord purposes.
|
protected PegasusProperties |
mProps
The object holding all the properties pertaining to Pegasus.
|
protected SiteStore |
mSiteStore
Handle to the site catalog store
|
protected TransformationCatalog |
mTCHandle
The handle to the transformation catalog.
|
static java.lang.String |
TRANSFORMATION_NAMESPACE
The transformation namespace for the cluster jobs.
|
static java.lang.String |
TRANSFORMATION_VERSION
The version number for the derivations for cluster jobs
|
VERSION
Constructor and Description |
---|
Abstract()
The default constructor.
|
Modifier and Type | Method and Description |
---|---|
abstract java.lang.String |
aggregatedJobArguments(AggregatedJob job)
Returns the arguments with which the
AggregatedJob
needs to be invoked with. |
AggregatedJob |
constructAbstractAggregatedJob(java.util.List jobs,
java.lang.String name,
java.lang.String id)
Constructs a new aggregated job that contains all the jobs passed to it.
|
AggregatedJob |
constructAbstractAggregatedJob(java.util.List jobs,
java.lang.String name,
java.lang.String id,
java.lang.String mergeLFN)
Constructs an abstract aggregated job that has a handle to the appropriate
JobAggregator that will be used to aggregate the jobs.
|
private TransformationCatalogEntry |
defaultTCEntry(java.lang.String name,
java.lang.String executableBasename,
java.lang.String site)
Returns a default TC entry to be used in case entry is not found in the
transformation catalog.
|
protected boolean |
entryNotInTC(java.lang.String namespace,
java.lang.String name,
java.lang.String version,
java.lang.String executableBasename,
java.lang.String site)
Determines whether there is NOT an entry in the transformation catalog
for a particular transformation on a particular site.
|
protected java.lang.String |
getCommentString(Job job,
int taskid)
Generates the comment string for the job .
|
static java.lang.String |
getCompleteTranformationName(java.lang.String name)
A convenience method to return the complete transformation name being
used to construct jobs in this class.
|
protected TransformationCatalogEntry |
getTCEntry(Job job)
Helper method to get an entry from the transformation catalog for an
installed executable.
|
void |
initialize(ADag dag,
PegasusBag bag)
Initializes the JobAggregator impelementation
|
void |
makeAbstractAggregatedJobConcrete(AggregatedJob job)
Enables the abstract clustered job for execution and converts it to it's
executable form
|
protected void |
setDirectory(java.lang.String directory)
Sets the directory where the stdin files are to be generated.
|
protected java.io.File |
writeOutInputFileForJobAggregator(AggregatedJob job)
Writes out the input file for the aggregated job
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
abortOnFristJobFailure, entryNotInTC, getClusterExecutableBasename, getClusterExecutableLFN, setAbortOnFirstJobFailure, topologicalOrderingRequired
public static final java.lang.String CLUSTERED_JOB_PREFIX
public static final java.lang.String TRANSFORMATION_NAMESPACE
public static final java.lang.String TRANSFORMATION_VERSION
public static final java.lang.String DERIVATION_NAMESPACE
public static final java.lang.String DERIVATION_VERSION
public static final java.lang.String MONITORD_COMMENT_MARKER
protected java.lang.String mDirectory
protected PegasusProperties mProps
protected LogManager mLogger
protected TransformationCatalog mTCHandle
protected SiteStore mSiteStore
protected ADag mClusteredADag
protected GridStartFactory mGridStartFactory
protected PegasusBag mBag
public static java.lang.String getCompleteTranformationName(java.lang.String name)
name
- the name of the transformationpublic void initialize(ADag dag, PegasusBag bag)
initialize
in interface JobAggregator
dag
- the workflow that is being clustered.bag
- the bag of objects that is useful for initialization.public abstract java.lang.String aggregatedJobArguments(AggregatedJob job)
AggregatedJob
needs to be invoked with.job
- the AggregatedJob
for which the arguments have
to be constructed.public AggregatedJob constructAbstractAggregatedJob(java.util.List jobs, java.lang.String name, java.lang.String id)
constructAbstractAggregatedJob
in interface JobAggregator
jobs
- the list of Job
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.Job
object corresponding to the aggregated
job containing the jobs passed as List in the input,
null if the list of jobs is emptypublic AggregatedJob constructAbstractAggregatedJob(java.util.List jobs, java.lang.String name, java.lang.String id, java.lang.String mergeLFN)
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.SubInfo
object corresponding to the aggregated
job containing the jobs passed as List in the input,
null if the list of jobs is emptypublic void makeAbstractAggregatedJobConcrete(AggregatedJob job)
makeAbstractAggregatedJobConcrete
in interface JobAggregator
job
- the abstract clustered jobprotected java.lang.String getCommentString(Job job, int taskid)
job
- the job for whichtaskid
- the task id to put in.protected TransformationCatalogEntry getTCEntry(Job job)
job
- the job whose corresponding TransformationCatalogEntry you want.private TransformationCatalogEntry defaultTCEntry(java.lang.String name, java.lang.String executableBasename, java.lang.String site)
name
- the logical name for the clustering transformation.executableBasename
- the basename for the executable in the bin directory
of a Pegasus installationsite
- the site for which the default entry is required.protected boolean entryNotInTC(java.lang.String namespace, java.lang.String name, java.lang.String version, java.lang.String executableBasename, java.lang.String site)
namespace
- the logical namespace of the transformation.name
- the logical name of the transformation.version
- the version of the transformation.executableBasename
- basename of the executable that does the clustering.site
- the site at which existence check is required.protected void setDirectory(java.lang.String directory)
directory
- the path to the directory to which it needs to be set.protected java.io.File writeOutInputFileForJobAggregator(AggregatedJob job)
job
- the aggregated job