Class JobMetric
- java.lang.Object
-
- org.apache.nemo.runtime.common.metric.JobMetric
-
- All Implemented Interfaces:
Metric
,StateMetric<PlanState.State>
public final class JobMetric extends java.lang.Object implements StateMetric<PlanState.State>
Metric class for Job (orPhysicalPlan
).
-
-
Constructor Summary
Constructors Constructor Description JobMetric(java.lang.String id)
Constructor with the designated id.JobMetric(PhysicalPlan physicalPlan)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addEvent(PlanState.State prevState, PlanState.State newState)
Add aStateTransitionEvent
to the metric.java.lang.String
getEdgeProperties()
java.lang.String
getId()
Get its unique id.java.lang.Long
getInputSize()
com.fasterxml.jackson.databind.JsonNode
getIRDAG()
java.lang.String
getIrDagSummary()
java.lang.Long
getJobDuration()
com.fasterxml.jackson.databind.JsonNode
getStageDAG()
java.util.List<StateTransitionEvent<PlanState.State>>
getStateTransitionEvents()
Get its list ofStateTransitionEvent
.java.lang.String
getVertexProperties()
boolean
processMetricMessage(java.lang.String metricField, byte[] metricValue)
Process metric message from evaluators.void
setIRDAG(IRDAG irDag)
Setter for the IR DAG.void
setJobDuration(java.lang.Long jobDuration)
void
setStageDAG(DAG<Stage,StageEdge> dag)
Setter for the stage DAG.
-
-
-
Constructor Detail
-
JobMetric
public JobMetric(PhysicalPlan physicalPlan)
Constructor.- Parameters:
physicalPlan
- physical plan to derive the id from.
-
JobMetric
public JobMetric(java.lang.String id)
Constructor with the designated id.- Parameters:
id
- the id.
-
-
Method Detail
-
getIRDAG
public com.fasterxml.jackson.databind.JsonNode getIRDAG()
-
getIrDagSummary
public java.lang.String getIrDagSummary()
-
getInputSize
public java.lang.Long getInputSize()
-
getVertexProperties
public java.lang.String getVertexProperties()
-
getEdgeProperties
public java.lang.String getEdgeProperties()
-
setIRDAG
public void setIRDAG(IRDAG irDag)
Setter for the IR DAG.- Parameters:
irDag
- the IR DAG.
-
getStageDAG
public com.fasterxml.jackson.databind.JsonNode getStageDAG()
-
setStageDAG
public void setStageDAG(DAG<Stage,StageEdge> dag)
Setter for the stage DAG.- Parameters:
dag
- the stage DAG.
-
getJobDuration
public java.lang.Long getJobDuration()
-
setJobDuration
public void setJobDuration(java.lang.Long jobDuration)
-
getId
public java.lang.String getId()
Description copied from interface:Metric
Get its unique id.
-
getStateTransitionEvents
public java.util.List<StateTransitionEvent<PlanState.State>> getStateTransitionEvents()
Description copied from interface:StateMetric
Get its list ofStateTransitionEvent
.- Specified by:
getStateTransitionEvents
in interfaceStateMetric<PlanState.State>
- Returns:
- list of events.
-
addEvent
public void addEvent(PlanState.State prevState, PlanState.State newState)
Description copied from interface:StateMetric
Add aStateTransitionEvent
to the metric.- Specified by:
addEvent
in interfaceStateMetric<PlanState.State>
- Parameters:
prevState
- previous state.newState
- new state.
-
processMetricMessage
public boolean processMetricMessage(java.lang.String metricField, byte[] metricValue)
Description copied from interface:Metric
Process metric message from evaluators.- Specified by:
processMetricMessage
in interfaceMetric
- Parameters:
metricField
- field name of the metric.metricValue
- byte array of serialized data value.- Returns:
- true if the metric was changed or false if not.
-
-