Class UserPOSTScript
- java.lang.Object
-
- edu.isi.pegasus.planner.code.gridstart.UserPOSTScript
-
- All Implemented Interfaces:
POSTScript
public class UserPOSTScript extends java.lang.Object implements POSTScript
A user defined post script. By default, the postscript is given the name of the job output file on the submit host, to work upon. Additional arguments to the post script can be specified via properties or profiles. The postscript is only constructed if the job already contains the Dagman profile key passed.- Version:
- $Revision$
- Author:
- Karan Vahi vahi@isi.edu
-
-
Field Summary
Fields Modifier and Type Field Description protected LogManager
mLogger
The LogManager object which is used to log all the messages.protected java.lang.String
mPOSTScriptPath
The path to the user postscript on the submit host.protected PegasusProperties
mProps
The object holding all the properties pertaining to Pegasus.static java.lang.String
SHORT_NAME
The SHORTNAME for this implementation.-
Fields inherited from interface edu.isi.pegasus.planner.code.POSTScript
VERSION
-
-
Constructor Summary
Constructors Constructor Description UserPOSTScript()
The default constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
construct(Job job, java.lang.String key)
Constructs the postscript that has to be invoked on the submit host after the job has executed on the remote end.java.lang.String
getExitCodePath()
Returns the path to exitcode that is to be used on the kickstart output.void
initialize(PegasusProperties properties, java.lang.String path, java.lang.String submitDir)
Initialize the POSTScript implementation.java.lang.String
shortDescribe()
Returns a short textual description of the implementing class.
-
-
-
Field Detail
-
SHORT_NAME
public static final java.lang.String SHORT_NAME
The SHORTNAME for this implementation.- See Also:
- Constant Field Values
-
mLogger
protected LogManager mLogger
The LogManager object which is used to log all the messages.
-
mProps
protected PegasusProperties mProps
The object holding all the properties pertaining to Pegasus.
-
mPOSTScriptPath
protected java.lang.String mPOSTScriptPath
The path to the user postscript on the submit host.
-
-
Method Detail
-
initialize
public void initialize(PegasusProperties properties, java.lang.String path, java.lang.String submitDir)
Initialize the POSTScript implementation.- Specified by:
initialize
in interfacePOSTScript
- Parameters:
properties
- thePegasusProperties
object containing all the properties required by Pegasus.path
- the path to the POSTScript on the submit host.submitDir
- the submit directory where the submit file for the job has to be generated.- Throws:
java.lang.RuntimeException
- in case of path being null.
-
construct
public boolean construct(Job job, java.lang.String key)
Constructs the postscript that has to be invoked on the submit host after the job has executed on the remote end. The postscript works on the stdout of the remote job, that has been transferred back to the submit host by Condor.The postscript is constructed and populated as a profile in the DAGMAN namespace.
- Specified by:
construct
in interfacePOSTScript
- Parameters:
job
- theJob
object containing the job description of the job that has to be enabled on the grid.key
- theDAGMan
profile key that has to be inserted.- Returns:
- boolean true if postscript was generated,else false.
-
shortDescribe
public java.lang.String shortDescribe()
Returns a short textual description of the implementing class.- Specified by:
shortDescribe
in interfacePOSTScript
- Returns:
- short textual description.
-
getExitCodePath
public java.lang.String getExitCodePath()
Returns the path to exitcode that is to be used on the kickstart output.- Returns:
- the path to the exitcode script to be invoked.
-
-