edu.isi.pegasus.planner.code.generator
public abstract class Abstract extends Object implements CodeGenerator
Modifier and Type | Field and Description |
---|---|
protected PegasusBag |
mBag
The bag of initialization objects.
|
protected LogManager |
mLogger
The LogManager object which is used to log all the messages.
|
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.
|
VERSION
Constructor and Description |
---|
Abstract() |
Modifier and Type | Method and Description |
---|---|
abstract Map<String,String> |
getAdditionalBraindumpEntries(ADag workflow)
Returns a Map containing additional metrics entries that are specific
to a Code Generator
|
protected String |
getDAGFilename(ADag dag,
String suffix)
Returns the name of the file on the basis of the metadata associated
with the DAG.
|
static String |
getDAGFilename(PlannerOptions options,
String name,
String index,
String suffix)
Returns the name of the file on the basis of the metadata associated
with the DAG.
|
String |
getFileBaseName(Job job)
Returns the basename of the file to which the job is written to.
|
PrintWriter |
getWriter(Job job)
Returns an open stream to the file that is used for writing out the
job information for the job.
|
void |
initialize(PegasusBag bag)
Initializes the Code Generator implementation.
|
void |
reset()
Resets the Code Generator implementation.
|
boolean |
startMonitoring()
Starts monitoring of the workflow by invoking a workflow monitor daemon.
|
protected void |
writeOutBraindump(ADag workflow)
Writes out the metrics file for the workflow
|
protected void |
writeOutDAXReplicaStore(ADag workflow)
Writes out the DAX replica store
|
protected void |
writeOutNotifications(ADag workflow)
Writes out the generator input file for the work-flow.
|
protected void |
writeOutStampedeEvents(ADag workflow)
Writes out the stampedeEventGenerator events for the workflow.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
generateCode, generateCode
protected PegasusBag mBag
protected String mSubmitFileDir
protected PegasusProperties mProps
protected PlannerOptions mPOptions
protected LogManager mLogger
protected String getDAGFilename(ADag dag, String suffix)
dag
- the dag for which the .dag file has to be created.suffix
- the suffix to be applied at the end.public static String getDAGFilename(PlannerOptions options, String name, String index, String suffix)
options
- the options passed to the planner.name
- the name attribute in daxindex
- the index attribute in dax.suffix
- the suffix to be applied at the end.public void initialize(PegasusBag bag) throws CodeGeneratorException
initialize
in interface CodeGenerator
bag
- the bag of initialization objects.CodeGeneratorException
- in case of any error occuring code generation.public boolean startMonitoring()
startMonitoring
in interface CodeGenerator
protected void writeOutStampedeEvents(ADag workflow) throws CodeGeneratorException
workflow
- the workflow whose metrics file needs to be generated.CodeGeneratorException
protected void writeOutBraindump(ADag workflow)
workflow
- the workflow whose metrics file needs to be generated.protected void writeOutDAXReplicaStore(ADag workflow)
workflow
- the work-flowprotected void writeOutNotifications(ADag workflow)
workflow
- the work-flow whose generator files needs to be generated.public abstract Map<String,String> getAdditionalBraindumpEntries(ADag workflow)
workflow
- the workflow whose metrics file needs to be generated.public void reset() throws CodeGeneratorException
reset
in interface CodeGenerator
CodeGeneratorException
- in case of any error occuring code generation.public PrintWriter getWriter(Job job) throws IOException
job
- the job whose job information needs to be written.IOException
- if unable to open a write handle to the file.