Package 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 Modifier and Type Field Description private java.util.Properties
mApplicationMetrics
The application metrics that need to be forwardedprivate java.lang.String
mBaseSubmitDirectory
The base submit directory where the files are being created.private java.lang.String
mClient
The name of the clientprivate 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 durationprivate double
mEndTime
The end time for the planning.private java.lang.String
mErrorMessage
The error message to be loggedprivate int
mExitcode
the exitcode of the plannerprivate 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 clientprivate java.lang.String
mUser
The user who planned the workflow.private java.lang.String
mVersion
The planner versionprivate 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.
-
Constructor Summary
Constructors Constructor Description PlannerMetrics()
The default metrics.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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 serverjava.lang.String
getBaseSubmitDirectory()
Returns the path to the base submit directory.java.lang.String
getDataConfiguration()
Returns the data configurationjava.lang.String
getDAX()
Sets the path to the DAX.double
getDuration()
Returns the duration for the planningdouble
getEndTime()
Returns the end time for the planning operation as epoch with millisecond precisionjava.lang.String
getErrorMessage()
Returns the error message that we want to logint
getExitcode()
Returns the exitcode for the plannerjava.io.File
getMetricsFileLocationInSubmitDirectory()
Sets the metrics file location in the submit directoryjava.lang.String
getMetricsType()
Returns the metric typejava.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 workflowdouble
getStartTime()
Returns the start time for the planning operation as epoch with millisecond precisionjava.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 workflowvoid
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 configurationvoid
setDAX(java.lang.String path)
Sets the path to the DAX.void
setDuration(double duration)
Sets the user.void
setEndTime(double end)
Set the end time for the planning operation.void
setEndTime(java.util.Date end)
Set the end time for the planning operation.void
setErrorMessage(java.lang.String error)
Set the error message that we want to logvoid
setExitcode(int exitcode)
Sets the exitcode for the planner.void
setMetricsFileLocationInSubmitDirectory(java.io.File f)
Sets the metrics file location in the submit directoryvoid
setMetricsType(java.lang.String type)
Sets the metricsvoid
setMetricsTypeToError()
Convenience setter methodvoid
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 workflowvoid
setStartTime(double start)
Set the start time for the planning operation.void
setStartTime(java.util.Date 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 groupvoid
setWorkflowMetrics(WorkflowMetrics metrics)
Sets the workflow metrics.void
setWorkflowUUID(java.lang.String uuid)
Sets the UUID for the workflowjava.lang.String
toJson()
Converts the planner metrics to JSONjava.lang.String
toPrettyJson()
Converts the planner metrics to JSONjava.lang.String
toString()
Returns a textual description of the object.-
Methods inherited from class edu.isi.pegasus.planner.classes.Data
setToString, vectorToString
-
-
-
-
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
@Expose @SerializedName("client") private final java.lang.String mClient
The name of the client- See Also:
- Constant Field Values
-
mVersion
@Expose @SerializedName("version") private final java.lang.String mVersion
The planner version
-
mType
@Expose @SerializedName("type") private java.lang.String mType
The name of the client
-
mStartTime
@Expose @SerializedName("start_time") private double mStartTime
The start time for the planning.
-
mEndTime
@Expose @SerializedName("end_time") private double mEndTime
The end time for the planning.
-
mDuration
@Expose @SerializedName("duration") private double mDuration
The planning duration
-
mExitcode
@Expose @SerializedName("exitcode") private int mExitcode
the exitcode of the planner
-
mRootWorkflowUUID
@Expose @SerializedName("root_wf_uuid") private java.lang.String mRootWorkflowUUID
The Root Workflow UUID.
-
mWorkflowUUID
@Expose @SerializedName("wf_uuid") private java.lang.String mWorkflowUUID
The UUID associated with the workflow.
-
mDataConfiguration
@Expose @SerializedName("data_config") private java.lang.String mDataConfiguration
The UUID associated with the workflow.
-
mWFMetrics
@Expose @SerializedName("wf_metrics") private WorkflowMetrics mWFMetrics
The metrics about the workflow.
-
mApplicationMetrics
@Expose @SerializedName("app_metrics") private java.util.Properties mApplicationMetrics
The application metrics that need to be forwarded
-
mErrorMessage
@Expose @SerializedName("error") private java.lang.String mErrorMessage
The error message to be logged
-
-
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.
-
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 classjava.lang.Object
- Returns:
- the clone
-
-