Class StageMetric
- java.lang.Object
-
- org.apache.nemo.runtime.common.metric.StageMetric
-
- All Implemented Interfaces:
Metric
,StateMetric<StageState.State>
public class StageMetric extends java.lang.Object implements StateMetric<StageState.State>
Metric class forStage
.
-
-
Constructor Summary
Constructors Constructor Description StageMetric(java.lang.String id)
StageMetric(Stage stage)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addEvent(StageState.State prevState, StageState.State newState)
Add aStateTransitionEvent
to the metric.java.lang.String
getId()
Get its unique id.java.util.List<StateTransitionEvent<StageState.State>>
getStateTransitionEvents()
Get its list ofStateTransitionEvent
.boolean
processMetricMessage(java.lang.String metricField, byte[] metricValue)
Process metric message from evaluators.
-
-
-
Constructor Detail
-
StageMetric
public StageMetric(Stage stage)
-
StageMetric
public StageMetric(java.lang.String id)
-
-
Method Detail
-
getId
public final java.lang.String getId()
Description copied from interface:Metric
Get its unique id.
-
getStateTransitionEvents
public final java.util.List<StateTransitionEvent<StageState.State>> getStateTransitionEvents()
Description copied from interface:StateMetric
Get its list ofStateTransitionEvent
.- Specified by:
getStateTransitionEvents
in interfaceStateMetric<StageState.State>
- Returns:
- list of events.
-
addEvent
public final void addEvent(StageState.State prevState, StageState.State newState)
Description copied from interface:StateMetric
Add aStateTransitionEvent
to the metric.- Specified by:
addEvent
in interfaceStateMetric<StageState.State>
- Parameters:
prevState
- previous state.newState
- new state.
-
processMetricMessage
public final 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.
-
-