edu.isi.pegasus.planner.classes

## Class PlannerMetrics

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

All Implemented Interfaces:
  java.lang.Cloneable

    public class PlannerMetrics
    extends Data

A Data class containing the metrics about the planning instance.

Version:
  $Revision$
Author:
  Karan Vahi

### Field Summary

Fields
`private java.util.Properties` `mApplicationMetrics` The application metrics that need to be forwarded
`private java.lang.String` `mBaseSubmitDirectory` The base submit directory where the files are being created.
`private java.lang.String` `mClient` The name of the client
`private java.lang.String` `mDataConfiguration` The UUID associated with the workflow.
`private java.lang.String` `mDAXPath` The path to the DAX that was planned by the workflow.
`private double` `mDuration` The planning duration
`private double` `mEndTime` The end time for the planning.
`private java.lang.String` `mErrorMessage` The error message to be logged
`private int` `mExitcode` the exitcode of the planner
`private java.io.File` `mMetricsFileInSubmitDirectory`
`private java.text.NumberFormat` `mNumFormatter` The number formatter to format the run submit dir entries.
`private java.lang.String` `mPropertiesPath` The pointer to the properties file that was used.
`private java.lang.String` `mRelativeSubmitDirectory` The relative submit directory for this run.
`private java.lang.String` `mRootWorkflowUUID` The Root Workflow UUID.
`private double` `mStartTime` The start time for the planning.
`private java.lang.String` `mType` The name of the client
`private java.lang.String` `mUser` The user who planned the workflow.
`private java.lang.String` `mVersion` The planner version
`private java.lang.String` `mVOGroup` The VOGroup to which the user belonged to.
`private WorkflowMetrics` `mWFMetrics` The metrics about the workflow.
`private java.lang.String` `mWorkflowUUID` The UUID associated with the workflow.

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

`mLogger, mLogMsg`

### Constructor Summary

Constructors
Constructor and Description
`PlannerMetrics()` The default metrics.

### Method Summary

All Methods Instance Methods Concrete Methods
`protected void` `append(java.lang.StringBuffer buffer, java.lang.String key, java.lang.String value)` Appends a key=value pair to the StringBuffer.
`java.lang.Object` `clone()` Returns the clone of the object.
`java.util.Properties` `getApplicationMetrics()` Returns the application specific metrics that will be forwarded to the server
`java.lang.String` `getBaseSubmitDirectory()` Returns the path to the base submit directory.
`java.lang.String` `getDataConfiguration()` Returns the data configuration
`java.lang.String` `getDAX()` Sets the path to the DAX.
`double` `getDuration()` Returns the duration for the planning
`double` `getEndTime()` Returns the end time for the planning operation as epoch with millisecond precision
`java.lang.String` `getErrorMessage()` Returns the error message that we want to log
`int` `getExitcode()` Returns the exitcode for the planner
`java.io.File` `getMetricsFileLocationInSubmitDirectory()` Sets the metrics file location in the submit directory
`java.lang.String` `getMetricsType()` Returns the metric type
`java.lang.String` `getProperties()` Returns the path to the properties file for the run.
`java.lang.String` `getRelativeSubmitDirectory()` Returns the path to the relative submit directory.
`java.lang.String` `getRootWorkflowUUID()` Returns the UUID for the Root workflow
`double` `getStartTime()` Returns the start time for the planning operation as epoch with millisecond precision
`java.lang.String` `getUser()` Returns the username.
`java.lang.String` `getVOGroup()` Returns the VO Group.
`WorkflowMetrics` `getWorkflowMetrics()` Returns the workflow metrics.
`java.lang.String` `getWorkflowUUID()` Returns the UUID for the workflow
`void` `setApplicationMetrics(PegasusProperties properties)` Sets the app metrics that need to be forwarded.
`void` `setApplicationMetrics(java.util.Properties properties)` Sets the app metrics that need to be forwarded.
`void` `setBaseSubmitDirectory(java.lang.String base)` Sets the path to the base submit directory.
`void` `setDataConfiguration(java.lang.String configuration)` The data configuration
`void` `setDAX(java.lang.String path)` Sets the path to the DAX.
`void` `setDuration(double duration)` Sets the user.
`void` `setEndTime(java.util.Date end)` Set the end time for the planning operation.
`void` `setEndTime(double end)` Set the end time for the planning operation.
`void` `setErrorMessage(java.lang.String error)` Set the error message that we want to log
`void` `setExitcode(int exitcode)` Sets the exitcode for the planner.
`void` `setMetricsFileLocationInSubmitDirectory(java.io.File f)` Sets the metrics file location in the submit directory
`void` `setMetricsType(java.lang.String type)` Sets the metrics
`void` `setMetricsTypeToError()` Convenience setter method
`void` `setProperties(java.lang.String path)` Sets the path to the properties file for the run.
`void` `setRelativeSubmitDirectory(java.lang.String relative)` Sets the path to the submit directory relative to the base.
`void` `setRootWorkflowUUID(java.lang.String uuid)` Sets the root UUID for the workflow
`void` `setStartTime(java.util.Date start)` Set the start time for the planning operation.
`void` `setStartTime(double start)` Set the start time for the planning operation.
`void` `setUser(java.lang.String user)` Sets the user.
`void` `setVOGroup(java.lang.String group)` Sets the vo group
`void` `setWorkflowMetrics(WorkflowMetrics metrics)` Sets the workflow metrics.
`void` `setWorkflowUUID(java.lang.String uuid)` Sets the UUID for the workflow
`java.lang.String` `toJson()` Converts the planner metrics to JSON
`java.lang.String` `toPrettyJson()` Converts the planner metrics to JSON
`java.lang.String` `toString()` Returns a textual description of the object.

### 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

#### mBaseSubmitDirectory

    private java.lang.String mBaseSubmitDirectory

The base submit directory where the files are being created.

#### mRelativeSubmitDirectory

    private java.lang.String mRelativeSubmitDirectory

The relative submit directory for this run.

#### mMetricsFileInSubmitDirectory

    private java.io.File mMetricsFileInSubmitDirectory

#### mDAXPath

    private java.lang.String mDAXPath

The path to the DAX that was planned by the workflow.

#### mPropertiesPath

    private java.lang.String mPropertiesPath

The pointer to the properties file that was used.

#### mUser

    private java.lang.String mUser

The user who planned the workflow.

#### mVOGroup

    private java.lang.String mVOGroup

The VOGroup to which the user belonged to.

#### mNumFormatter

    private java.text.NumberFormat mNumFormatter

The number formatter to format the run submit dir entries.

#### mClient

    private final java.lang.String mClient

The name of the client

See Also:
  Constant Field Values

#### mVersion

    private final java.lang.String mVersion

The planner version

#### mType

    private java.lang.String mType

The name of the client

#### mStartTime

    private double mStartTime

The start time for the planning.

#### mEndTime

    private double mEndTime

The end time for the planning.

#### mDuration

    private double mDuration

The planning duration

#### mExitcode

    private int mExitcode

the exitcode of the planner

#### mRootWorkflowUUID

    private java.lang.String mRootWorkflowUUID

The Root Workflow UUID.

#### mWorkflowUUID

    private java.lang.String mWorkflowUUID

The UUID associated with the workflow.

#### mDataConfiguration

    private java.lang.String mDataConfiguration

The UUID associated with the workflow.

#### mWFMetrics

    private WorkflowMetrics mWFMetrics

The metrics about the workflow.

#### mApplicationMetrics

    private java.util.Properties mApplicationMetrics

The application metrics that need to be forwarded

#### mErrorMessage

    private java.lang.String mErrorMessage

The error message to be logged

### Constructor Detail

#### PlannerMetrics

    public PlannerMetrics()

The default metrics.

### Method Detail

#### getRootWorkflowUUID

    public java.lang.String getRootWorkflowUUID()

Returns the UUID for the Root workflow

Returns:
  the UUID of the workflow

#### setRootWorkflowUUID

    public void setRootWorkflowUUID(java.lang.String uuid)

Sets the root UUID for the workflow

Parameters:
  `uuid` - the UUID of the workflow

#### getWorkflowUUID

    public java.lang.String getWorkflowUUID()

Returns the UUID for the workflow

Returns:
  the UUID of the workflow

#### setWorkflowUUID

    public void setWorkflowUUID(java.lang.String uuid)

Sets the UUID for the workflow

Parameters:
  `uuid` - the UUID of the workflow

#### getWorkflowMetrics

    public WorkflowMetrics getWorkflowMetrics()

Returns the workflow metrics.

Returns:
  the workflow metrics.

#### setWorkflowMetrics

    public void setWorkflowMetrics(WorkflowMetrics metrics)

Sets the workflow metrics.

Parameters:
  `metrics` - the workflow metrics.

#### setApplicationMetrics

    public void setApplicationMetrics(java.util.Properties properties)

Sets the app metrics that need to be forwarded.

Parameters:
  `metrics` - the application metrics

#### setApplicationMetrics

    public void setApplicationMetrics(PegasusProperties properties)

Sets the app metrics that need to be forwarded.

Parameters:
  `metrics` - the application metrics

#### getApplicationMetrics

    public java.util.Properties getApplicationMetrics()

Returns the application specific metrics that will be forwarded to the server

Returns:
  the application metrics

#### getUser

    public java.lang.String getUser()

Returns the username.

Returns:
  the user.

#### setUser

    public void setUser(java.lang.String user)

Sets the user.

Parameters:
  `user` - the user.

#### setMetricsType

    public void setMetricsType(java.lang.String type)

Sets the metrics

Parameters:
  `type` - the metrics type

#### setMetricsTypeToError

    public void setMetricsTypeToError()

Convenience setter method

Parameters:
  `type` - the metrics type

#### getMetricsType

    public java.lang.String getMetricsType()

Returns the metric type

Returns:
  metrics type

#### setVOGroup

    public void setVOGroup(java.lang.String group)

Sets the vo group

Parameters:
  `group` - the vo group.

#### getVOGroup

    public java.lang.String getVOGroup()

Returns the VO Group.

Returns:
  the VO Group to which the user belongs

#### setProperties

    public void setProperties(java.lang.String path)

Sets the path to the properties file for the run.

Parameters:
  `path` - the path to the properties file.

#### getProperties

    public java.lang.String getProperties()

Returns the path to the properties file for the run.

Returns:
  the path to the properties file.

#### setBaseSubmitDirectory

    public void setBaseSubmitDirectory(java.lang.String base)

Sets the path to the base submit directory.

Parameters:
  `base` - the path to the base submit directory.

#### getBaseSubmitDirectory

    public java.lang.String getBaseSubmitDirectory()

Returns the path to the base submit directory.

Returns:
  the path to the base submit directory.

#### setRelativeSubmitDirectory

    public void setRelativeSubmitDirectory(java.lang.String relative)

Sets the path to the submit directory relative to the base.

Parameters:
  `relative` - the relative path from the base submit directory.

#### getRelativeSubmitDirectory

    public java.lang.String getRelativeSubmitDirectory()

Returns the path to the relative submit directory.

Returns:
  the path to the relative submit directory.

#### setMetricsFileLocationInSubmitDirectory

    public void setMetricsFileLocationInSubmitDirectory(java.io.File f)

Sets the metrics file location in the submit directory

Parameters:
  `f` - the file pointing to the metrics file

#### getMetricsFileLocationInSubmitDirectory

    public java.io.File getMetricsFileLocationInSubmitDirectory()

Sets the metrics file location in the submit directory

Returns:
  the file pointing to the metrics file. can be null

#### setDAX

    public void setDAX(java.lang.String path)

Sets the path to the DAX.

Parameters:
  `path` - the path to the DAX file.

#### getDAX

    public java.lang.String getDAX()

Sets the path to the DAX.

Returns:
  the path to the DAX file.

#### setDataConfiguration

    public void setDataConfiguration(java.lang.String configuration)

The data configuration

Parameters:
  `configuration` - the data configuration

#### getDataConfiguration

    public java.lang.String getDataConfiguration()

Returns the data configuration

Returns:
  the data configuration

#### setStartTime

    public void setStartTime(java.util.Date start)

Set the start time for the planning operation.

Parameters:
  `start` - the start time.

#### setStartTime

    public void setStartTime(double start)

Set the start time for the planning operation.

Parameters:
  `start` - the start time.

#### getStartTime

    public double getStartTime()

Returns the start time for the planning operation as epoch with millisecond precision

Returns:
  the start time.

#### setEndTime

    public void setEndTime(java.util.Date end)

Set the end time for the planning operation.

Parameters:
  `end` - the end time.

#### setEndTime

    public void setEndTime(double end)

Set the end time for the planning operation.

Parameters:
  `end` - the end time.

#### getEndTime

    public double getEndTime()

Returns the end time for the planning operation as epoch with millisecond precision

Returns:
  the end time.

#### getDuration

    public double getDuration()

Returns the duration for the planning

Returns:
  the duration

#### setDuration

    public void setDuration(double duration)

Sets the user.

Parameters:
  `duration` - the duration

#### getExitcode

    public int getExitcode()

Returns the exitcode for the planner

Returns:
  the exitcode

#### setExitcode

    public void setExitcode(int exitcode)

Sets the exitcode for the planner.

Parameters:
  `exitcode` - the exitcode

#### setErrorMessage

    public void setErrorMessage(java.lang.String error)

Set the error message that we want to log

Parameters:
  `error` - error

#### getErrorMessage

    public java.lang.String getErrorMessage()

Returns the error message that we want to log

Returns:
  the error message

#### toJson

    public java.lang.String toJson()

Converts the planner metrics to JSON

Returns:
  the planner metrics in JSON

#### toPrettyJson

    public java.lang.String toPrettyJson()

Converts the planner metrics to JSON

Returns:
  the planner metrics in JSON

#### toString

    public java.lang.String toString()

Returns a textual description of the object.

Specified by:
  `toString` in class `Data`
Returns:
  Object

#### append

    protected void append(java.lang.StringBuffer buffer,
                          java.lang.String key,
                          java.lang.String value)

Appends a key=value pair to the StringBuffer.

Parameters:
  `buffer` - the StringBuffer that is to be appended to.
  `key` - the key.
  `value` - the value.

#### clone

    public java.lang.Object clone()

Returns the clone of the object.

Overrides:
  `clone` in class `java.lang.Object`
Returns:
  the clone