edu.isi.pegasus.planner.code.generator
Class Metrics

java.lang.Object
  extended by edu.isi.pegasus.planner.code.generator.Metrics

public class Metrics
extends Object

A Metrics file generator that generates a metrics file in the submit directory The following metrics are logged in the metrics file

 

Version:
$Revision: 3409 $
Author:
Karan Vahi

Field Summary
protected  PegasusBag mBag
          The bag of initialization objects.
static String METRICS_FILE_SUFFIX
          The suffix to use while constructing the name of the metrics file
protected  LogManager mLogger
          The handle to the logging object.
protected  PlannerOptions mPOptions
          The object containing the command line options specified to the planner at runtime.
protected  PegasusProperties mProps
          The object holding all the properties pertaining to Pegasus.
protected  String mSubmitFileDir
          The directory where all the submit files are to be generated.
 
Constructor Summary
Metrics()
           
 
Method Summary
 Collection<File> generateCode(ADag dag)
          Generates the code for the executable workflow in terms of a braindump file that contains workflow metadata useful for monitoring daemons etc.
 void generateCode(ADag dag, Job job)
          Method not implemented.
 void initialize(PegasusBag bag)
          Initializes the Code Generator implementation.
protected  File writeOutMetricsFile(ADag dag)
          Writes out the workflow metrics file in the submit directory
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

METRICS_FILE_SUFFIX

public static final String METRICS_FILE_SUFFIX
The suffix to use while constructing the name of the metrics file

See Also:
Constant Field Values

mBag

protected PegasusBag mBag
The bag of initialization objects.


mSubmitFileDir

protected String mSubmitFileDir
The directory where all the submit files are to be generated.


mProps

protected PegasusProperties mProps
The object holding all the properties pertaining to Pegasus.


mPOptions

protected PlannerOptions mPOptions
The object containing the command line options specified to the planner at runtime.


mLogger

protected LogManager mLogger
The handle to the logging object.

Constructor Detail

Metrics

public Metrics()
Method Detail

initialize

public void initialize(PegasusBag bag)
                throws CodeGeneratorException
Initializes the Code Generator implementation.

Parameters:
bag - the bag of initialization objects.
Throws:
CodeGeneratorException - in case of any error occuring code generation.

generateCode

public Collection<File> generateCode(ADag dag)
                              throws CodeGeneratorException
Generates the code for the executable workflow in terms of a braindump file that contains workflow metadata useful for monitoring daemons etc.

Parameters:
dag - the concrete workflow.
Returns:
the Collection of File objects for the files written out.
Throws:
CodeGeneratorException - in case of any error occuring code generation.

generateCode

public void generateCode(ADag dag,
                         Job job)
                  throws CodeGeneratorException
Method not implemented. Throws an exception.

Parameters:
dag - the workflow
job - the job for which the code is to be generated.
Throws:
CodeGeneratorException

writeOutMetricsFile

protected File writeOutMetricsFile(ADag dag)
                            throws IOException
Writes out the workflow metrics file in the submit directory

Parameters:
dag - the final executable workflow
Returns:
the absolute path to the braindump file.txt written in the directory.
Throws:
IOException - in case of error while writing out file.


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