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.PropertiesmApplicationMetricsThe application metrics that need to be forwardedprivate java.lang.StringmBaseSubmitDirectoryThe base submit directory where the files are being created.private java.lang.StringmClientThe name of the clientprivate java.lang.StringmDataConfigurationThe UUID associated with the workflow.private java.lang.StringmDAXPathThe path to the DAX that was planned by the workflow.private doublemDurationThe planning durationprivate doublemEndTimeThe end time for the planning.private java.lang.StringmErrorMessageThe error message to be loggedprivate intmExitcodethe exitcode of the plannerprivate java.io.FilemMetricsFileInSubmitDirectoryprivate java.text.NumberFormatmNumFormatterThe number formatter to format the run submit dir entries.private java.lang.StringmPropertiesPathThe pointer to the properties file that was used.private java.lang.StringmRelativeSubmitDirectoryThe relative submit directory for this run.private java.lang.StringmRootWorkflowUUIDThe Root Workflow UUID.private doublemStartTimeThe start time for the planning.private java.lang.StringmTypeThe name of the clientprivate java.lang.StringmUserThe user who planned the workflow.private java.lang.StringmVersionThe planner versionprivate java.lang.StringmVOGroupThe VOGroup to which the user belonged to.private WorkflowMetricsmWFMetricsThe metrics about the workflow.private java.lang.StringmWorkflowUUIDThe 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 voidappend(java.lang.StringBuffer buffer, java.lang.String key, java.lang.String value)Appends a key=value pair to the StringBuffer.java.lang.Objectclone()Returns the clone of the object.java.util.PropertiesgetApplicationMetrics()Returns the application specific metrics that will be forwarded to the serverjava.lang.StringgetBaseSubmitDirectory()Returns the path to the base submit directory.java.lang.StringgetDataConfiguration()Returns the data configurationjava.lang.StringgetDAX()Sets the path to the DAX.doublegetDuration()Returns the duration for the planningdoublegetEndTime()Returns the end time for the planning operation as epoch with millisecond precisionjava.lang.StringgetErrorMessage()Returns the error message that we want to logintgetExitcode()Returns the exitcode for the plannerjava.io.FilegetMetricsFileLocationInSubmitDirectory()Sets the metrics file location in the submit directoryjava.lang.StringgetMetricsType()Returns the metric typejava.lang.StringgetProperties()Returns the path to the properties file for the run.java.lang.StringgetRelativeSubmitDirectory()Returns the path to the relative submit directory.java.lang.StringgetRootWorkflowUUID()Returns the UUID for the Root workflowdoublegetStartTime()Returns the start time for the planning operation as epoch with millisecond precisionjava.lang.StringgetUser()Returns the username.java.lang.StringgetVOGroup()Returns the VO Group.WorkflowMetricsgetWorkflowMetrics()Returns the workflow metrics.java.lang.StringgetWorkflowUUID()Returns the UUID for the workflowvoidsetApplicationMetrics(PegasusProperties properties)Sets the app metrics that need to be forwarded.voidsetApplicationMetrics(java.util.Properties properties)Sets the app metrics that need to be forwarded.voidsetBaseSubmitDirectory(java.lang.String base)Sets the path to the base submit directory.voidsetDataConfiguration(java.lang.String configuration)The data configurationvoidsetDAX(java.lang.String path)Sets the path to the DAX.voidsetDuration(double duration)Sets the user.voidsetEndTime(double end)Set the end time for the planning operation.voidsetEndTime(java.util.Date end)Set the end time for the planning operation.voidsetErrorMessage(java.lang.String error)Set the error message that we want to logvoidsetExitcode(int exitcode)Sets the exitcode for the planner.voidsetMetricsFileLocationInSubmitDirectory(java.io.File f)Sets the metrics file location in the submit directoryvoidsetMetricsType(java.lang.String type)Sets the metricsvoidsetMetricsTypeToError()Convenience setter methodvoidsetProperties(java.lang.String path)Sets the path to the properties file for the run.voidsetRelativeSubmitDirectory(java.lang.String relative)Sets the path to the submit directory relative to the base.voidsetRootWorkflowUUID(java.lang.String uuid)Sets the root UUID for the workflowvoidsetStartTime(double start)Set the start time for the planning operation.voidsetStartTime(java.util.Date start)Set the start time for the planning operation.voidsetUser(java.lang.String user)Sets the user.voidsetVOGroup(java.lang.String group)Sets the vo groupvoidsetWorkflowMetrics(WorkflowMetrics metrics)Sets the workflow metrics.voidsetWorkflowUUID(java.lang.String uuid)Sets the UUID for the workflowjava.lang.StringtoJson()Converts the planner metrics to JSONjava.lang.StringtoPrettyJson()Converts the planner metrics to JSONjava.lang.StringtoString()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 mClientThe name of the client- See Also:
- Constant Field Values
-
mVersion
@Expose @SerializedName("version") private final java.lang.String mVersionThe planner version
-
mType
@Expose @SerializedName("type") private java.lang.String mTypeThe name of the client
-
mStartTime
@Expose @SerializedName("start_time") private double mStartTimeThe start time for the planning.
-
mEndTime
@Expose @SerializedName("end_time") private double mEndTimeThe end time for the planning.
-
mDuration
@Expose @SerializedName("duration") private double mDurationThe planning duration
-
mExitcode
@Expose @SerializedName("exitcode") private int mExitcodethe exitcode of the planner
-
mRootWorkflowUUID
@Expose @SerializedName("root_wf_uuid") private java.lang.String mRootWorkflowUUIDThe Root Workflow UUID.
-
mWorkflowUUID
@Expose @SerializedName("wf_uuid") private java.lang.String mWorkflowUUIDThe UUID associated with the workflow.
-
mDataConfiguration
@Expose @SerializedName("data_config") private java.lang.String mDataConfigurationThe UUID associated with the workflow.
-
mWFMetrics
@Expose @SerializedName("wf_metrics") private WorkflowMetrics mWFMetricsThe metrics about the workflow.
-
mApplicationMetrics
@Expose @SerializedName("app_metrics") private java.util.Properties mApplicationMetricsThe application metrics that need to be forwarded
-
mErrorMessage
@Expose @SerializedName("error") private java.lang.String mErrorMessageThe 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:
clonein classjava.lang.Object- Returns:
- the clone
-
-