edu.isi.pegasus.planner.client
Class NetloggerExitcode

java.lang.Object
  extended by edu.isi.pegasus.planner.client.Executable
      extended by edu.isi.pegasus.planner.client.NetloggerExitcode

public class NetloggerExitcode
extends Executable

This parses the kickstart records and logs via Log4j the kickstart record in the Netlogger Format.

Version:
$Revision: 3538 $
Author:
Karan Vahi

Field Summary
private  String mFilename
          The kickstart file being parsed.
private  String mJobID
          The id of the job.
private  int mLoggingLevel
          The logging level to be used.
private  String mWorkflowID
          The workflow id.
 
Fields inherited from class edu.isi.pegasus.planner.client.Executable
mLogger, mLogMsg, mProps, mVersion
 
Constructor Summary
NetloggerExitcode()
          Default constructor.
 
Method Summary
 int executeCommand()
          Executes the command on the basis of the options specified.
 gnu.getopt.LongOpt[] generateValidOptions()
          Tt generates the LongOpt which contain the valid options that the command will accept.
 void initialize(String[] opts)
          Initialize the NetloggerExitCode object
 void loadProperties()
          Loads all the properties that would be needed by the Toolkit classes.
 void log(String msg, int level)
          Logs messages to the logger.
static void main(String[] args)
          The main program.
 void parseCommandLineArguments(String[] args)
          Parses the command line arguments using GetOpt and returns a PlannerOptions contains all the options passed by the user at the command line.
 void printLongVersion()
          Prints the long description, displaying in detail what the various options to the command stand for.
 void printShortVersion()
          Prints out a short description of what the command does.
protected  void setupLogging()
          Sets up the logging options for this class.
 
Methods inherited from class edu.isi.pegasus.planner.client.Executable
convertException, convertException, getCommandLineOptions, getEnvValue, getGVDSVersion, initialize, lookupConfProperty, sanityCheckOnProperties, setupLogging
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

mLoggingLevel

private int mLoggingLevel
The logging level to be used.


mFilename

private String mFilename
The kickstart file being parsed.


mJobID

private String mJobID
The id of the job.


mWorkflowID

private String mWorkflowID
The workflow id.

Constructor Detail

NetloggerExitcode

public NetloggerExitcode()
Default constructor.

Method Detail

initialize

public void initialize(String[] opts)
Initialize the NetloggerExitCode object

Overrides:
initialize in class Executable
Parameters:
opts - the command line argument passed to the NetloggerExitCode

main

public static void main(String[] args)
The main program.

Parameters:
args - the main arguments passed to the plotter.

setupLogging

protected void setupLogging()
Sets up the logging options for this class. Looking at the properties file, sets up the appropriate writers for output and stderr.


executeCommand

public int executeCommand()
Executes the command on the basis of the options specified.

Parameters:
args - the command line options.
Returns:
the exitcode to exit with

parseCommandLineArguments

public void parseCommandLineArguments(String[] args)
Parses the command line arguments using GetOpt and returns a PlannerOptions contains all the options passed by the user at the command line.

Parameters:
args - the arguments passed by the user at command line.

log

public void log(String msg,
                int level)
Logs messages to the logger. Adds the workflow id.

Overrides:
log in class Executable
Parameters:
msg - is the message itself.
level - is the level to generate the log message for.

generateValidOptions

public gnu.getopt.LongOpt[] generateValidOptions()
Tt generates the LongOpt which contain the valid options that the command will accept.

Specified by:
generateValidOptions in class Executable
Returns:
array of LongOpt objects , corresponding to the valid options

printShortVersion

public void printShortVersion()
Prints out a short description of what the command does.

Specified by:
printShortVersion in class Executable

printLongVersion

public void printLongVersion()
Prints the long description, displaying in detail what the various options to the command stand for.

Specified by:
printLongVersion in class Executable

loadProperties

public void loadProperties()
Loads all the properties that would be needed by the Toolkit classes.

Specified by:
loadProperties in class Executable


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