Class NetloggerPostScript
- java.lang.Object
-
- edu.isi.pegasus.planner.code.gridstart.NetloggerPostScript
-
- All Implemented Interfaces:
POSTScript
public class NetloggerPostScript extends java.lang.Object implements POSTScript
This postscript invokes the netlogger-exitcode to parse the kickstart output and write out in netlogger format.- Version:
- $Revision$
- Author:
- Karan Vahi vahi@isi.edu
-
-
Field Summary
Fields Modifier and Type Field Description private static java.lang.StringLOG4J_CONF_PROPERTYThe LOG4j system configuration property.private java.lang.StringmLog4jConfThe log4j system propertyprotected LogManagermLoggerThe LogManager object which is used to log all the messages.protected java.lang.StringmPOSTScriptPathThe path to the user postscript on the submit host.private java.lang.StringmPostScriptPropertiesThe path to the properties file created in submit directory.protected PegasusPropertiesmPropsThe object holding all the properties pertaining to Pegasus.private java.lang.StringmWorkflowIDthe workflow id used.static java.lang.StringSHORT_NAMEThe SHORTNAME for this implementation.static java.lang.StringWORKFLOW_ID_PROPERTYThe property to be set for postscript to pick up workflow id-
Fields inherited from interface edu.isi.pegasus.planner.code.POSTScript
VERSION
-
-
Constructor Summary
Constructors Constructor Description NetloggerPostScript()The default constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidappendProperty(java.lang.StringBuffer sb, java.lang.String key, java.lang.String value)Appends a property to the StringBuffer, in the java command line format.booleanconstruct(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.StringgetNetloggerExitCodePath()Returns the path to exitcode that is to be used on the kickstart output.protected java.lang.StringgetPostScriptProperties(PegasusProperties properties)Returns the properties that need to be passed to the the postscript invocation in the java format.voidinitialize(PegasusProperties properties, java.lang.String path, java.lang.String submitDir)Initialize the POSTScript implementation.java.lang.StringshortDescribe()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
-
WORKFLOW_ID_PROPERTY
public static final java.lang.String WORKFLOW_ID_PROPERTY
The property to be set for postscript to pick up workflow id- See Also:
- Constant Field Values
-
LOG4J_CONF_PROPERTY
private static java.lang.String LOG4J_CONF_PROPERTY
The LOG4j system configuration property.
-
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.
-
mPostScriptProperties
private java.lang.String mPostScriptProperties
The path to the properties file created in submit directory.
-
mWorkflowID
private java.lang.String mWorkflowID
the workflow id used.
-
mLog4jConf
private java.lang.String mLog4jConf
The log4j system property
-
-
Method Detail
-
initialize
public void initialize(PegasusProperties properties, java.lang.String path, java.lang.String submitDir)
Initialize the POSTScript implementation.- Specified by:
initializein interfacePOSTScript- Parameters:
properties- thePegasusPropertiesobject 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:
constructin interfacePOSTScript- Parameters:
job- theJobobject containing the job description of the job that has to be enabled on the grid.key- theDAGManprofile 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:
shortDescribein interfacePOSTScript- Returns:
- short textual description.
-
getNetloggerExitCodePath
public java.lang.String getNetloggerExitCodePath()
Returns the path to exitcode that is to be used on the kickstart output.- Returns:
- the path to the exitcode script to be invoked.
-
getPostScriptProperties
protected java.lang.String getPostScriptProperties(PegasusProperties properties)
Returns the properties that need to be passed to the the postscript invocation in the java format. It is of the form "-Dprop1=value1 -Dprop2=value2 .."- Parameters:
properties- the properties object- Returns:
- the properties list, else empty string.
-
appendProperty
protected void appendProperty(java.lang.StringBuffer sb, java.lang.String key, java.lang.String value)Appends a property to the StringBuffer, in the java command line format.- Parameters:
sb- the StringBuffer to append the property to.key- the property.value- the property value.
-
-