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

java.lang.Object
  extended by edu.isi.pegasus.planner.code.generator.MonitordNotify
All Implemented Interfaces:
CodeGenerator

public class MonitordNotify
extends Object
implements CodeGenerator

A MonitordNotify Input File Generator that generates the input file required for pegasus-monitord.

Version:
$Revision: 3855 $
Author:
Rajiv Mayani

Field Summary
static String DAG_JOB
          The constant string to write for dag job notifications.
static String DAX_JOB
          The constant string to write for dax job notifications.
static String DELIMITER
          The delimiter with which to separate different fields in the notifications file.
static String INVOCATION
          The constant string to write for invocation notifications.
static String JOB
          The constant string to write for job notifications.
protected  PegasusBag mBag
          The bag of initialization objects.
protected  LogManager mLogger
          The handle to the logging object.
private  PrintWriter mNotificationsWriter
          The handle to the PrintWriter that writes out the notifications file
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.
static String NOTIFICATIONS_FILE_SUFFIX
          The suffix to use while constructing the name of the metrics file
static String WORKFLOW
          The constant string to write for work flow notifications.
 
Fields inherited from interface edu.isi.pegasus.planner.code.CodeGenerator
VERSION
 
Constructor Summary
MonitordNotify()
           
 
Method Summary
 Collection<File> generateCode(ADag dag)
          Generates the notifications input file.
 void generateCode(ADag dag, Job job)
          Not implemented
 void initialize(PegasusBag bag)
          Initializes the Code Generator implementation.
 void reset()
          Not implemented
 boolean startMonitoring()
          Not implemented
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NOTIFICATIONS_FILE_SUFFIX

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

See Also:
Constant Field Values

WORKFLOW

public static final String WORKFLOW
The constant string to write for work flow notifications.

See Also:
Constant Field Values

JOB

public static final String JOB
The constant string to write for job notifications.

See Also:
Constant Field Values

INVOCATION

public static final String INVOCATION
The constant string to write for invocation notifications.

See Also:
Constant Field Values

DAG_JOB

public static final String DAG_JOB
The constant string to write for dag job notifications.

See Also:
Constant Field Values

DAX_JOB

public static final String DAX_JOB
The constant string to write for dax job notifications.

See Also:
Constant Field Values

DELIMITER

public static final String DELIMITER
The delimiter with which to separate different fields in the notifications 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.


mNotificationsWriter

private PrintWriter mNotificationsWriter
The handle to the PrintWriter that writes out the notifications file

Constructor Detail

MonitordNotify

public MonitordNotify()
Method Detail

initialize

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

Specified by:
initialize in interface CodeGenerator
Parameters:
bag - the bag of initialization objects.
Throws:
CodeGeneratorException - in case of any error occurring code generation.

generateCode

public Collection<File> generateCode(ADag dag)
                              throws CodeGeneratorException
Generates the notifications input file. The method initially generates work-flow level notification records, followed by job-level notification records.

Specified by:
generateCode in interface CodeGenerator
Parameters:
dag - the concrete work-flow.
Returns:
the Collection of File objects for the files written out.
Throws:
CodeGeneratorException - in case of any error occurring code generation.

generateCode

public void generateCode(ADag dag,
                         Job job)
                  throws CodeGeneratorException
Not implemented

Specified by:
generateCode in interface CodeGenerator
Parameters:
dag - the work-flow
job - the job for which the code is to be generated.
Throws:
CodeGeneratorException

startMonitoring

public boolean startMonitoring()
Not implemented

Specified by:
startMonitoring in interface CodeGenerator
Returns:
boolean indicating whether could successfully start the monitor daemon or not.

reset

public void reset()
           throws CodeGeneratorException
Not implemented

Specified by:
reset in interface CodeGenerator
Throws:
CodeGeneratorException - in case of any error occuring code generation.


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