edu.isi.pegasus.planner.classes

## Class DagInfo

- java.lang.Object
- - edu.isi.pegasus.planner.classes.Data
  - - edu.isi.pegasus.planner.classes.DagInfo

All Implemented Interfaces:
  java.lang.Cloneable

    public class DagInfo
    extends Data

Holds the information needed to make one dag file corresponding to a Abstract Dag. It holds information to generate the .dax file which is submitted to Condor.

Version:
  $Revision$
Author:
  Karan Vahi, Gaurang Mehta

### Field Summary

Fields
`private static java.lang.String` `DEFAULT_NAME` The default name for the ADag object, if not supplied in the DAX.
`java.util.TreeMap` `lfnMap` Contains a unique ordered listing of the logical names referred to by the dag.
`private java.lang.String` `mCount` Refers to the number of the Abstract Dags which are being sent to the Concrete Planner in response to the user's request.
`private java.lang.String` `mDAXMTime` Keeps the last modified time of the DAX.
`private java.lang.String` `mDAXVersion` The DAX Version
`private java.lang.String` `mFlowID` It is a unique identifier identifying the concrete DAG generated by Pegasus.
`private java.lang.String` `mFlowIDName` It is the name of the dag as generated by Chimera in the dax.
`private java.lang.String` `mFlowTimestamp` The ISO timestamp corresponding to the time when Pegasus is invoked for a dax.
`private java.lang.String` `mIndex` Refers to the number of the Dag.
`private java.lang.String` `mNameOfADag` The name of the Abstract Dag taken from the adag element of the DAX generated by the Abstract Planner.
`private java.lang.String` `mReleaseVersion` Identifies the release version of the VDS software that was used to generate the workflow.
`private WorkflowMetrics` `mWFMetrics` The workflow metric objects that contains metrics about the workflow being planned.

### Fields inherited from class edu.isi.pegasus.planner.classes.Data

`mLogger, mLogMsg`

### Constructor Summary

Constructors
Constructor and Description
`DagInfo()` The default constructor.

### Method Summary

All Methods Instance Methods Concrete Methods
`java.lang.Object` `clone()` Returns a new copy of the Object.
`void` `generateFlowID()` Generates the flow id for this current run.
`void` `generateFlowName()` Generates the name of the flow.
`java.lang.String` `getCount()` Returns the count of the workflow, that was specified in the DAX.
`java.lang.String` `getDAXVersion()` Returns the dax version
`java.lang.String` `getFlowID()` Returns the generated flow ID for the workflow.
`java.lang.String` `getFlowName()` Returns the flow name
`java.lang.String` `getFlowTimestamp()` Returns the flow timestamp for the workflow.
`java.lang.String` `getIndex()`
`java.lang.String` `getLabel()` Returns the label of the workflow, that was specified in the DAX.
`java.util.Set` `getLFNs()` It returns the list of lfns referred to by the DAG.
`java.util.Set` `getLFNs(boolean onlyInput)` Returns the list of lfns referred to by the DAG.
`java.lang.String` `getMTime()` Returns the last modified time for the file containing the workflow description.
`java.lang.String` `getReleaseVersion()` Return the release version
`WorkflowMetrics` `getWorkflowMetrics()` Returns the workflow metrics so far.
`void` `setCount(java.lang.String count)` Set the count of the workflow, that was specified in the DAX.
`void` `setDAXMTime(java.io.File f)` Sets the mtime (last modified time) for the DAX.
`void` `setDAXMTime(java.lang.String time)` Sets the mtime (last modified time) for the DAX.
`void` `setDAXVersion(java.lang.String version)` Sets the dax version
`void` `setFlowTimestamp(java.lang.String timestamp)` Sets the flow timestamp for the workflow.
`void` `setIndex(java.lang.String index)` Set the index of the workflow, that was specified in the DAX.
`void` `setLabel(java.lang.String label)` Sets the label for the workflow.
`void` `setReleaseVersion()` Grabs the release version from VDS.Properties file.
`java.lang.String` `toString()` Returns the a textual description of the object.
`void` `updateLFNMap(java.lang.String lfn, java.lang.String type)` Updates the lfn map, that contains the mapping of an lfn with the type.

### Methods inherited from class edu.isi.pegasus.planner.classes.Data

`setToString, vectorToString`

### Methods inherited from class java.lang.Object

`equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

### Field Detail

#### DEFAULT_NAME

    private static final java.lang.String DEFAULT_NAME

The default name for the ADag object, if not supplied in the DAX.

See Also:
  Constant Field Values

#### mNameOfADag

    private java.lang.String mNameOfADag

The name of the Abstract Dag taken from the adag element of the DAX generated by the Abstract Planner.

#### mCount

    private java.lang.String mCount

Refers to the number of the Abstract Dags which are being sent to the Concrete Planner in response to the user's request.

#### mIndex

    private java.lang.String mIndex

Refers to the number of the Dag. Index can vary from 0 to mCount - 1.

#### mFlowID

    private java.lang.String mFlowID

It is a unique identifier identifying the concrete DAG generated by Pegasus. It consists of the dag name and the timestamp.

See Also:
  `mFlowIDName`, `mFlowTimestamp`

#### mFlowIDName

    private java.lang.String mFlowIDName

It is the name of the dag as generated by Chimera in the dax. If none is specified then a default name of PegasusRun is assigned.

#### mFlowTimestamp

    private java.lang.String mFlowTimestamp

The ISO timestamp corresponding to the time when Pegasus is invoked for a dax. It is used to generate the random directory names also if required.

#### mDAXMTime

    private java.lang.String mDAXMTime

Keeps the last modified time of the DAX.

#### mReleaseVersion

    private java.lang.String mReleaseVersion

Identifies the release version of the VDS software that was used to generate the workflow. It is populated from Version.java.

#### mWFMetrics

    private WorkflowMetrics mWFMetrics

The workflow metric objects that contains metrics about the workflow being planned.

#### lfnMap

    public java.util.TreeMap lfnMap

Contains a unique ordered listing of the logical names referred to by the dag. The TreeMap implementation guarentees us a log(n) execution time for the basic operations. Hence should scale well. The key for the map is the lfn name. The value is a String flag denoting whether this file is an input(i) or output(o) or both (b) or none(n). A value of none(n) would denote an error condition.

#### mDAXVersion

    private java.lang.String mDAXVersion

The DAX Version

### Constructor Detail

#### DagInfo

    public DagInfo()

The default constructor.

### Method Detail

#### getLFNs

    public java.util.Set getLFNs()

It returns the list of lfns referred to by the DAG. The list is unique as it is gotten from iterating through the lfnMap.

Returns:
  a Set of `String`objects corresponding to the logical filenames``

#### getLFNs

    public java.util.Set getLFNs(boolean onlyInput)

Returns the list of lfns referred to by the DAG. The list is unique as it is gotten from iterating through the lfnMap. The contents of the list are determined on the basis of the command line options passed by the user at runtime. For e.g. if the user has specified force, then one needs to search only for the input files.

Parameters:
  `onlyInput` - a boolean flag indicating that you need only the input files to the whole workflow
Returns:
  a set of logical filenames.

#### getLabel

    public java.lang.String getLabel()

Returns the label of the workflow, that was specified in the DAX.

Returns:
  the label of the workflow.

#### getIndex

    public java.lang.String getIndex()

#### setIndex

    public void setIndex(java.lang.String index)

Set the index of the workflow, that was specified in the DAX.

Parameters:
  `index` - the count

#### setCount

    public void setCount(java.lang.String count)

Set the count of the workflow, that was specified in the DAX.

Parameters:
  `count` - the count

#### getCount

    public java.lang.String getCount()

Returns the count of the workflow, that was specified in the DAX.

Returns:
  the count

#### getDAXVersion

    public java.lang.String getDAXVersion()

Returns the dax version

Returns:
  the dax version.

#### getMTime

    public java.lang.String getMTime()

Returns the last modified time for the file containing the workflow description.

Returns:
  the MTime

#### getFlowTimestamp

    public java.lang.String getFlowTimestamp()

Returns the flow timestamp for the workflow.

Returns:
  the flowtimestamp

#### setFlowTimestamp

    public void setFlowTimestamp(java.lang.String timestamp)

Sets the flow timestamp for the workflow.

Parameters:
  `timestamp` - the flowtimestamp

#### getWorkflowMetrics

    public WorkflowMetrics getWorkflowMetrics()

Returns the workflow metrics so far.

Returns:
  the workflow metrics

#### generateFlowID

    public void generateFlowID()

Generates the flow id for this current run. It is made of the name of the dag and a timestamp. This is a simple concat of the mFlowTimestamp and the flowName. For it work correctly the function needs to be called after the flow name and timestamp have been generated.

#### getFlowID

    public java.lang.String getFlowID()

Returns the generated flow ID for the workflow.

Returns:

#### generateFlowName

    public void generateFlowName()

Generates the name of the flow.

#### getFlowName

    public java.lang.String getFlowName()

Returns the flow name

#### setLabel

    public void setLabel(java.lang.String label)

Sets the label for the workflow.

Parameters:
  `label` - the label to be assigned to the workflow

#### setDAXVersion

    public void setDAXVersion(java.lang.String version)

Sets the dax version

Parameters:
  `version` - the version of the DAX

#### setDAXMTime

    public void setDAXMTime(java.io.File f)

Sets the mtime (last modified time) for the DAX. It is the time, when the DAX file was last modified. If the DAX file does not exist or an IO error occurs, the MTime is set to OL i.e . The DAX mTime is always generated in an extended format. Generating not in extended format, leads to the XML parser tripping while parsing the invocation record generated by Kickstart.

Parameters:
  `f` - the file descriptor to the DAX|PDAX file.

#### setDAXMTime

    public void setDAXMTime(java.lang.String time)

Sets the mtime (last modified time) for the DAX. It is the time, when the DAX file was last modified. If the DAX file does not exist or an IO error occurs, the MTime is set to OL i.e . The DAX mTime is always generated in an extended format. Generating not in extended format, leads to the XML parser tripping while parsing the invocation record generated by Kickstart.

Parameters:
  `time` - iso formatted time string indicating the last modified time of DAX

#### getReleaseVersion

    public java.lang.String getReleaseVersion()

Return the release version

#### setReleaseVersion

    public void setReleaseVersion()

Grabs the release version from VDS.Properties file.

#### updateLFNMap

    public void updateLFNMap(java.lang.String lfn,
                             java.lang.String type)

Updates the lfn map, that contains the mapping of an lfn with the type.

Parameters:
  `lfn` - the logical file name.
  `type` - type the type of lfn (i|o|b). usually a character.

#### clone

    public java.lang.Object clone()

Returns a new copy of the Object.

Overrides:
  `clone` in class `java.lang.Object`
Returns:
  a copy of the object.

#### toString

    public java.lang.String toString()

Returns the a textual description of the object.

Specified by:
  `toString` in class `Data`
Returns:
  textual description.