Class TaskMetric
- java.lang.Object
-
- org.apache.nemo.runtime.common.metric.TaskMetric
-
- All Implemented Interfaces:
Metric
,StateMetric<TaskState.State>
public class TaskMetric extends java.lang.Object implements StateMetric<TaskState.State>
Metric class forTask
.
-
-
Constructor Summary
Constructors Constructor Description TaskMetric(java.lang.String id)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addEvent(TaskState.State prevState, TaskState.State newState)
Add aStateTransitionEvent
to the metric.long
getBoundedSourceReadTime()
Method related to bounded source read time.java.lang.String
getContainerId()
Method related to container Id.long
getEncodedReadBytes()
Method related to encoded read bytes.java.lang.String
getId()
Get its unique id.java.util.Map<java.lang.String,java.util.List<LatencyMetric>>
getLatencyMetric()
long
getPeakExecutionMemory()
Method related to peak execution memory.int
getScheduleAttempt()
Method related to schedule attempt.long
getSchedulingOverhead()
Method related to scheduling overhead.long
getSerializedReadBytes()
Method related to serialized read bytes.long
getShuffleReadBytes()
Method related to shuffle.long
getShuffleReadTime()
long
getShuffleWriteBytes()
long
getShuffleWriteTime()
java.util.List<StateTransitionEvent<TaskState.State>>
getStateTransitionEvents()
Method related to state transition events.java.util.Map<java.lang.String,java.util.List<StreamMetric>>
getStreamMetric()
Method related to stream metric.long
getTaskCPUTime()
Method related to task CPU time.long
getTaskDeserializationTime()
Method related to task deserialization time.long
getTaskDuration()
Method related to task duration.long
getTaskOutputBytes()
Method related to task output bytes.long
getTaskSerializationTime()
Method related to task serialization time.int
getTaskSizeRatio()
Method related to task size ratio.boolean
processMetricMessage(java.lang.String metricField, byte[] metricValue)
Process metric message from evaluators.
-
-
-
Method Detail
-
getContainerId
public final java.lang.String getContainerId()
Method related to container Id.
-
getScheduleAttempt
public final int getScheduleAttempt()
Method related to schedule attempt.
-
getStateTransitionEvents
public final java.util.List<StateTransitionEvent<TaskState.State>> getStateTransitionEvents()
Method related to state transition events.- Specified by:
getStateTransitionEvents
in interfaceStateMetric<TaskState.State>
- Returns:
- list of events.
-
addEvent
public final void addEvent(TaskState.State prevState, TaskState.State newState)
Description copied from interface:StateMetric
Add aStateTransitionEvent
to the metric.- Specified by:
addEvent
in interfaceStateMetric<TaskState.State>
- Parameters:
prevState
- previous state.newState
- new state.
-
getTaskDuration
public final long getTaskDuration()
Method related to task duration.
-
getStreamMetric
public final java.util.Map<java.lang.String,java.util.List<StreamMetric>> getStreamMetric()
Method related to stream metric.- Returns:
- the streamMetrics
-
getLatencyMetric
public final java.util.Map<java.lang.String,java.util.List<LatencyMetric>> getLatencyMetric()
-
getTaskCPUTime
public final long getTaskCPUTime()
Method related to task CPU time.
-
getSchedulingOverhead
public final long getSchedulingOverhead()
Method related to scheduling overhead.
-
getSerializedReadBytes
public final long getSerializedReadBytes()
Method related to serialized read bytes. serialized = encoded + compressed
-
getEncodedReadBytes
public final long getEncodedReadBytes()
Method related to encoded read bytes.
-
getTaskOutputBytes
public final long getTaskOutputBytes()
Method related to task output bytes.
-
getTaskSerializationTime
public final long getTaskSerializationTime()
Method related to task serialization time.
-
getTaskDeserializationTime
public final long getTaskDeserializationTime()
Method related to task deserialization time.
-
getBoundedSourceReadTime
public final long getBoundedSourceReadTime()
Method related to bounded source read time.
-
getPeakExecutionMemory
public final long getPeakExecutionMemory()
Method related to peak execution memory.
-
getTaskSizeRatio
public final int getTaskSizeRatio()
Method related to task size ratio.
-
getShuffleReadBytes
public final long getShuffleReadBytes()
Method related to shuffle.
-
getShuffleReadTime
public final long getShuffleReadTime()
-
getShuffleWriteBytes
public final long getShuffleWriteBytes()
-
getShuffleWriteTime
public final long getShuffleWriteTime()
-
getId
public final java.lang.String getId()
Description copied from interface:Metric
Get its unique id.
-
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.
-
-