edu.isi.pegasus.planner.code.gridstart
Class NetloggerPostScript

java.lang.Object
  extended by edu.isi.pegasus.planner.code.gridstart.NetloggerPostScript
All Implemented Interfaces:
POSTScript

public class NetloggerPostScript
extends Object
implements POSTScript

This postscript invokes the netlogger-exitcode to parse the kickstart output and write out in netlogger format.

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

Field Summary
private static String LOG4J_CONF_PROPERTY
          The LOG4j system configuration property.
private  String mLog4jConf
          The log4j system property
protected  LogManager mLogger
          The LogManager object which is used to log all the messages.
protected  String mPOSTScriptPath
          The path to the user postscript on the submit host.
private  String mPostScriptProperties
          The path to the properties file created in submit directory.
protected  PegasusProperties mProps
          The object holding all the properties pertaining to Pegasus.
private  String mWorkflowID
          the workflow id used.
static String SHORT_NAME
          The SHORTNAME for this implementation.
static String WORKFLOW_ID_PROPERTY
          The property to be set for postscript to pick up workflow id
 
Fields inherited from interface edu.isi.pegasus.planner.code.POSTScript
VERSION
 
Constructor Summary
NetloggerPostScript()
          The default constructor.
 
Method Summary
protected  void appendProperty(StringBuffer sb, String key, String value)
          Appends a property to the StringBuffer, in the java command line format.
 boolean construct(Job job, String key)
          Constructs the postscript that has to be invoked on the submit host after the job has executed on the remote end.
 String getNetloggerExitCodePath()
          Returns the path to exitcode that is to be used on the kickstart output.
protected  String getPostScriptProperties(PegasusProperties properties)
          Returns the properties that need to be passed to the the postscript invocation in the java format.
 void initialize(PegasusProperties properties, String path, String submitDir)
          Initialize the POSTScript implementation.
 String shortDescribe()
          Returns a short textual description of the implementing class.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SHORT_NAME

public static final String SHORT_NAME
The SHORTNAME for this implementation.

See Also:
Constant Field Values

WORKFLOW_ID_PROPERTY

public static final 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 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 String mPOSTScriptPath
The path to the user postscript on the submit host.


mPostScriptProperties

private String mPostScriptProperties
The path to the properties file created in submit directory.


mWorkflowID

private String mWorkflowID
the workflow id used.


mLog4jConf

private String mLog4jConf
The log4j system property

Constructor Detail

NetloggerPostScript

public NetloggerPostScript()
The default constructor.

Method Detail

initialize

public void initialize(PegasusProperties properties,
                       String path,
                       String submitDir)
Initialize the POSTScript implementation.

Specified by:
initialize in interface POSTScript
Parameters:
properties - the PegasusProperties 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:
RuntimeException - in case of path being null.

construct

public boolean construct(Job job,
                         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 interface POSTScript
Parameters:
job - the Job object containing the job description of the job that has to be enabled on the grid.
key - the DAGMan profile key that has to be inserted.
Returns:
boolean true if postscript was generated,else false.

shortDescribe

public String shortDescribe()
Returns a short textual description of the implementing class.

Specified by:
shortDescribe in interface POSTScript
Returns:
short textual description.

getNetloggerExitCodePath

public 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 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(StringBuffer sb,
                              String key,
                              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.


Copyright © 2011 The University of Southern California. All Rights Reserved.