Class SeqExec
- java.lang.Object
-
- edu.isi.pegasus.planner.cluster.aggregator.Abstract
-
- edu.isi.pegasus.planner.cluster.aggregator.SeqExec
-
- All Implemented Interfaces:
JobAggregator
public class SeqExec extends Abstract
This class aggregates the smaller jobs in a manner such that they are launched at remote end, sequentially on a single node using seqexec. The executable seqexec is a Pegasus tool distributed in the Pegasus worker package, and can be usually found at $PEGASUS_HOME/bin/seqexec.- Version:
- $Revision$
- Author:
- Karan Vahi vahi@isi.edu
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringCOLLAPSE_LOGICAL_NAMEThe logical name of the transformation that is able to run multiple jobs sequentially.static java.lang.StringEXECUTABLE_BASENAMEThe basename of the pegasus cluster executable.private booleanmFailOnFirstErrorFlag indicating whether to fail on first hard error or not.private booleanmGlobalLogFlag indicating whether a global log file or per job file.private booleanmLogProgressFlag to indicate whether to log progress or not.static java.lang.StringSEQEXEC_PROGRESS_REPORT_SUFFIXThe suffix to be applied to seqexec progress report file.-
Fields inherited from class edu.isi.pegasus.planner.cluster.aggregator.Abstract
CLUSTERED_JOB_PREFIX, DERIVATION_NAMESPACE, DERIVATION_VERSION, mBag, mClusteredADag, mDirectory, mGridStartFactory, mLogger, MONITORD_COMMENT_MARKER, mProps, mSiteStore, mTCHandle, TRANSFORMATION_NAMESPACE, TRANSFORMATION_VERSION
-
Fields inherited from interface edu.isi.pegasus.planner.cluster.JobAggregator
VERSION
-
-
Constructor Summary
Constructors Constructor Description SeqExec()The default constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanabortOnFristJobFailure()Returns a boolean indicating whether to fail the aggregated job on detecting the first failure during execution of constituent jobs.java.lang.StringaggregatedJobArguments(AggregatedJob job)Returns the arguments with which theAggregatedJobneeds to be invoked with.booleanentryNotInTC(java.lang.String site)Determines whether there is NOT an entry in the transformation catalog for the job aggregator executable on a particular site.java.lang.StringgetClusterExecutableBasename()Returns the executable basename of the clustering executable used.java.lang.StringgetClusterExecutableLFN()Returns the logical name of the transformation that is used to collapse the jobs.voidinitialize(ADag dag, PegasusBag bag)Initializes the JobAggregator impelementationprotected java.lang.StringlogFile(AggregatedJob job)Returns the name of the log file to used on the remote site, for the seqexec job.voidmakeAbstractAggregatedJobConcrete(AggregatedJob job)Enables the abstract clustered job for execution and converts it to it's executable form.voidsetAbortOnFirstJobFailure(boolean fail)Setter method to indicate , failure on first consitutent job should result in the abort of the whole aggregated job.booleantopologicalOrderingRequired()A boolean indicating whether ordering is important while traversing through the aggregated job.-
Methods inherited from class edu.isi.pegasus.planner.cluster.aggregator.Abstract
constructAbstractAggregatedJob, constructAbstractAggregatedJob, entryNotInTC, getCommentString, getCompleteTranformationName, getTCEntry, setDirectory, writeOutInputFileForJobAggregator
-
-
-
-
Field Detail
-
COLLAPSE_LOGICAL_NAME
public static final java.lang.String COLLAPSE_LOGICAL_NAME
The logical name of the transformation that is able to run multiple jobs sequentially.- See Also:
- Constant Field Values
-
EXECUTABLE_BASENAME
public static final java.lang.String EXECUTABLE_BASENAME
The basename of the pegasus cluster executable.- See Also:
- Constant Field Values
-
SEQEXEC_PROGRESS_REPORT_SUFFIX
public static final java.lang.String SEQEXEC_PROGRESS_REPORT_SUFFIX
The suffix to be applied to seqexec progress report file.- See Also:
- Constant Field Values
-
mGlobalLog
private boolean mGlobalLog
Flag indicating whether a global log file or per job file.
-
mFailOnFirstError
private boolean mFailOnFirstError
Flag indicating whether to fail on first hard error or not.
-
mLogProgress
private boolean mLogProgress
Flag to indicate whether to log progress or not.
-
-
Method Detail
-
initialize
public void initialize(ADag dag, PegasusBag bag)
Initializes the JobAggregator impelementation- Specified by:
initializein interfaceJobAggregator- Overrides:
initializein classAbstract- Parameters:
dag- the workflow that is being clustered.bag- the bag of objects that is useful for initialization.
-
makeAbstractAggregatedJobConcrete
public void makeAbstractAggregatedJobConcrete(AggregatedJob job)
Enables the abstract clustered job for execution and converts it to it's executable form. Also associates the post script that should be invoked for the AggregatedJob- Specified by:
makeAbstractAggregatedJobConcretein interfaceJobAggregator- Overrides:
makeAbstractAggregatedJobConcretein classAbstract- Parameters:
job- the abstract clustered job
-
getClusterExecutableLFN
public java.lang.String getClusterExecutableLFN()
Returns the logical name of the transformation that is used to collapse the jobs.- Returns:
- the the logical name of the collapser executable.
- See Also:
COLLAPSE_LOGICAL_NAME
-
getClusterExecutableBasename
public java.lang.String getClusterExecutableBasename()
Returns the executable basename of the clustering executable used.- Returns:
- the executable basename.
- See Also:
EXECUTABLE_BASENAME
-
entryNotInTC
public boolean entryNotInTC(java.lang.String site)
Determines whether there is NOT an entry in the transformation catalog for the job aggregator executable on a particular site.- Parameters:
site- the site at which existence check is required.- Returns:
- boolean true if an entry does not exists, false otherwise.
-
aggregatedJobArguments
public java.lang.String aggregatedJobArguments(AggregatedJob job)
Returns the arguments with which theAggregatedJobneeds to be invoked with.- Specified by:
aggregatedJobArgumentsin classAbstract- Parameters:
job- theAggregatedJobfor which the arguments have to be constructed.- Returns:
- argument string
-
setAbortOnFirstJobFailure
public void setAbortOnFirstJobFailure(boolean fail)
Setter method to indicate , failure on first consitutent job should result in the abort of the whole aggregated job. Ignores any value passed, as MPIExec does not handle it for time being.- Parameters:
fail- indicates whether to abort or not .
-
abortOnFristJobFailure
public boolean abortOnFristJobFailure()
Returns a boolean indicating whether to fail the aggregated job on detecting the first failure during execution of constituent jobs.- Returns:
- boolean indicating whether to fail or not.
-
topologicalOrderingRequired
public boolean topologicalOrderingRequired()
A boolean indicating whether ordering is important while traversing through the aggregated job.- Returns:
- true
-
logFile
protected java.lang.String logFile(AggregatedJob job)
Returns the name of the log file to used on the remote site, for the seqexec job. Depending upon the property settings, either assigns a common- Parameters:
job- theAggregatedJob- Returns:
- the path to the log file.
-
-