Class ClassADSGenerator
- java.lang.Object
-
- edu.isi.pegasus.planner.code.generator.condor.ClassADSGenerator
-
public class ClassADSGenerator extends java.lang.Object
A helper class, that generates Pegasus specific classads for the jobs.- Version:
- $Revision$
- Author:
- Karan Vahi
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
BUILD_AD_KEY
The classad key for the pegasus build.static java.lang.String
CORES_KEY
The key for the number of cores for the multiplier factor in stampede.static java.lang.String
DAG_JOB_ID_KEY
The class ad for the jobId.static java.lang.String
DAX_JOB_ID_KEY
The classad for generating the DAX IDstatic java.lang.String
GENERATOR
The name of the generator.static java.lang.String
GENERATOR_AD_KEY
The complete classad designating Pegasus as the generator.static java.lang.String
JOB_CLASS_AD_KEY
The class ad for job Class.static java.lang.String
JOB_CLUSTER_SIZE_AD_KEY
The class ad to designate the size of the clustered jobs.static java.lang.String
JOB_RUNTIME_AD_KEY
The class ad for the expected job valuestatic java.lang.String
RESOURCE_AD_KEY
The class ad to store the execution pool at which the job is run.static java.lang.String
ROOT_WF_UUID_KEY
The classad for the root workflow uuidstatic java.lang.String
VERSION_AD_KEY
The class ad key for the version id.static java.lang.String
WF_NAME_AD_KEY
The classad for the flow id.static java.lang.String
WF_TIME_AD_KEY
The classad for the timestamp.static java.lang.String
WF_UUID_KEY
The classad for the workflow uuidstatic java.lang.String
XFORMATION_AD_KEY
The classad for the complete transformation name.
-
Constructor Summary
Constructors Constructor Description ClassADSGenerator()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
generate(java.io.PrintWriter writer, ADag dag)
Writes out the classads for a workflow to corresponding writer stream.static void
generate(java.io.PrintWriter writer, ADag dag, Job job)
Writes out the classads for a job to corresponding writer stream.private static java.lang.String
generateClassAdAttribute(java.lang.String name, int value)
Generates a classad attribute given the name and the value.private static java.lang.String
generateClassAdAttribute(java.lang.String name, java.lang.String value)
Generates a classad attribute given the name and the value.private static java.lang.String
generateClassAdAttribute(java.lang.String name, java.lang.String value, boolean newLine)
Generates a classad attribute given the name and the value.
-
-
-
Field Detail
-
GENERATOR
public static final java.lang.String GENERATOR
The name of the generator.- See Also:
- Constant Field Values
-
GENERATOR_AD_KEY
public static final java.lang.String GENERATOR_AD_KEY
The complete classad designating Pegasus as the generator.- See Also:
- Constant Field Values
-
VERSION_AD_KEY
public static final java.lang.String VERSION_AD_KEY
The class ad key for the version id.- See Also:
org.griphyn.cPlanner.classes.DagInfo#releaseVersion
, Constant Field Values
-
BUILD_AD_KEY
public static final java.lang.String BUILD_AD_KEY
The classad key for the pegasus build.- See Also:
- Constant Field Values
-
ROOT_WF_UUID_KEY
public static final java.lang.String ROOT_WF_UUID_KEY
The classad for the root workflow uuid- See Also:
- Constant Field Values
-
WF_UUID_KEY
public static final java.lang.String WF_UUID_KEY
The classad for the workflow uuid- See Also:
- Constant Field Values
-
WF_NAME_AD_KEY
public static final java.lang.String WF_NAME_AD_KEY
The classad for the flow id.- See Also:
org.griphyn.cPlanner.classes.DagInfo#flowIDName
, Constant Field Values
-
WF_TIME_AD_KEY
public static final java.lang.String WF_TIME_AD_KEY
The classad for the timestamp.- See Also:
org.griphyn.cPlanner.classes.DagInfo#mFlowTimestamp
, Constant Field Values
-
XFORMATION_AD_KEY
public static final java.lang.String XFORMATION_AD_KEY
The classad for the complete transformation name.- See Also:
- Constant Field Values
-
DAX_JOB_ID_KEY
public static final java.lang.String DAX_JOB_ID_KEY
The classad for generating the DAX ID- See Also:
- Constant Field Values
-
JOB_CLASS_AD_KEY
public static final java.lang.String JOB_CLASS_AD_KEY
The class ad for job Class.- See Also:
org.griphyn.cPlanner.classes.Job#jobClass
, Constant Field Values
-
DAG_JOB_ID_KEY
public static final java.lang.String DAG_JOB_ID_KEY
The class ad for the jobId.- See Also:
org.griphyn.cPlanner.classes.Job#jobID
, Constant Field Values
-
JOB_RUNTIME_AD_KEY
public static final java.lang.String JOB_RUNTIME_AD_KEY
The class ad for the expected job value- See Also:
- Constant Field Values
-
CORES_KEY
public static final java.lang.String CORES_KEY
The key for the number of cores for the multiplier factor in stampede.- See Also:
- Constant Field Values
-
RESOURCE_AD_KEY
public static final java.lang.String RESOURCE_AD_KEY
The class ad to store the execution pool at which the job is run. The globusscheduler specified in the submit file refers to the jobmanager on this execution pool.- See Also:
- Constant Field Values
-
JOB_CLUSTER_SIZE_AD_KEY
public static final java.lang.String JOB_CLUSTER_SIZE_AD_KEY
The class ad to designate the size of the clustered jobs.- See Also:
- Constant Field Values
-
-
Method Detail
-
generate
public static void generate(java.io.PrintWriter writer, ADag dag)
Writes out the classads for a workflow to corresponding writer stream.- Parameters:
writer
- is an open stream for the Condor submit file.dag
- the workflow object containing metadata about the workflow like the workflow id and the release version.
-
generate
public static void generate(java.io.PrintWriter writer, ADag dag, Job job)
Writes out the classads for a job to corresponding writer stream. The writer stream points to a Condor Submit file for the job.- Parameters:
writer
- is an open stream for the Condor submit file.dag
- the workflow object containing metadata about the workflow like the workflow id and the release version.job
- theJob
object for which the writer stream is passed.
-
generateClassAdAttribute
private static java.lang.String generateClassAdAttribute(java.lang.String name, java.lang.String value)
Generates a classad attribute given the name and the value.- Parameters:
name
- the attribute name.value
- the value/expression making the classad attribute.- Returns:
- the classad attriubute.
-
generateClassAdAttribute
private static java.lang.String generateClassAdAttribute(java.lang.String name, int value)
Generates a classad attribute given the name and the value. It by default adds a new line character at start of each attribute.- Parameters:
name
- the attribute name.value
- the value/expression making the classad attribute.- Returns:
- the classad attriubute.
-
generateClassAdAttribute
private static java.lang.String generateClassAdAttribute(java.lang.String name, java.lang.String value, boolean newLine)
Generates a classad attribute given the name and the value.- Parameters:
name
- the attribute name.value
- the value/expression making the classad attribute.newLine
- boolean denoting whether to add a new line character at start or not.- Returns:
- the classad attriubute.
-
-