Class TaskMetric
- java.lang.Object
-
- org.apache.wayang.spark.monitoring.metrics.TaskMetric
-
- All Implemented Interfaces:
java.io.Serializable
,SerializableObject
,TaskMetric
public class TaskMetric extends java.lang.Object implements TaskMetric, SerializableObject
This class represents the metrics for a task in the Apache Wayang monitoring system. It implements the TaskMetric interface and SerializableObject interface to allow for serialization.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description TaskMetric()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description long
getByteRead()
Gets the number of bytes read by the task.long
getBytesWrittern()
Returns the number of bytes written by the task.long
getDiskBytesSpilled()
Gets the number of bytes spilled to disk by the task.long
getExecutorCPUTime()
long
getExecutorDeserializeCpuTime()
Gets the CPU time used for deserializing the task executor.long
getExecutorDeserializeTime()
Gets the time taken to deserialize the task executor.long
getexecutorRunTime()
Gets the total time taken by the task executor to run.long
getJVMGCTime()
Gets the amount of time spent by the JVM on garbage collection.long
getPeakExecutionMemory()
Gets the peak execution memory used by the task executor.long
getRecordsWrittern()
Returns the number of records written by the task.long
getResultSerializationTime()
Returns the time taken to serialize the result of the task.long
getResultSize()
Gets the size of the result produced by the task.void
setBytesRead(long bytesRead)
Sets the number of bytes read by the task.void
setBytesWritten(long bytesWritten)
Sets the number of bytes written by the task.void
setDiskBytesSpilled(long DiskByteSpilled)
Sets the number of bytes spilled to disk by the task.void
setExecutorCPUTime(long executorCPUTime)
void
setExecutorDeserializeCpuTime(long executorDeserializeCpuTime)
Sets the CPU time used for deserializing the task executor.void
setExecutorDeserializeTime(long executorDeserializeTime)
Sets the time taken to deserialize the task executor.void
setExecutorRunTime(long time)
Sets the total time taken by the task executor to run.void
setjvmGCTime(long time)
Sets the amount of time spent by the JVM on garbage collection.void
setPeakExecutionMemory(long peakExecutionMemory)
Sets the peak execution memory used by the task executor.void
setRecordsWritten(long recordsWritten)
Sets the number of records written by the task.void
setResultSerializationTime(long resultSerializationTime)
Sets the time taken to serialize the result of the task.void
setResultSize(long resultSize)
Sets the size of the result produced by the task.
-
-
-
Method Detail
-
getExecutorCPUTime
public long getExecutorCPUTime()
-
setExecutorCPUTime
public void setExecutorCPUTime(long executorCPUTime)
-
setBytesRead
public void setBytesRead(long bytesRead)
Description copied from interface:TaskMetric
Sets the number of bytes read by the task.- Specified by:
setBytesRead
in interfaceTaskMetric
- Parameters:
bytesRead
- the number of bytes read
-
getByteRead
public long getByteRead()
Description copied from interface:TaskMetric
Gets the number of bytes read by the task.- Specified by:
getByteRead
in interfaceTaskMetric
- Returns:
- the number of bytes read
-
setExecutorDeserializeCpuTime
public void setExecutorDeserializeCpuTime(long executorDeserializeCpuTime)
Description copied from interface:TaskMetric
Sets the CPU time used for deserializing the task executor.- Specified by:
setExecutorDeserializeCpuTime
in interfaceTaskMetric
- Parameters:
executorDeserializeCpuTime
- the CPU time used for deserializing the executor
-
getExecutorDeserializeCpuTime
public long getExecutorDeserializeCpuTime()
Description copied from interface:TaskMetric
Gets the CPU time used for deserializing the task executor.- Specified by:
getExecutorDeserializeCpuTime
in interfaceTaskMetric
- Returns:
- the CPU time used for deserializing the executor
-
setExecutorDeserializeTime
public void setExecutorDeserializeTime(long executorDeserializeTime)
Description copied from interface:TaskMetric
Sets the time taken to deserialize the task executor.- Specified by:
setExecutorDeserializeTime
in interfaceTaskMetric
- Parameters:
executorDeserializeTime
- the time taken to deserialize the executor
-
getExecutorDeserializeTime
public long getExecutorDeserializeTime()
Description copied from interface:TaskMetric
Gets the time taken to deserialize the task executor.- Specified by:
getExecutorDeserializeTime
in interfaceTaskMetric
- Returns:
- the time taken to deserialize the executor
-
setDiskBytesSpilled
public void setDiskBytesSpilled(long DiskByteSpilled)
Description copied from interface:TaskMetric
Sets the number of bytes spilled to disk by the task.- Specified by:
setDiskBytesSpilled
in interfaceTaskMetric
- Parameters:
DiskByteSpilled
- the number of bytes spilled to disk
-
getDiskBytesSpilled
public long getDiskBytesSpilled()
Description copied from interface:TaskMetric
Gets the number of bytes spilled to disk by the task.- Specified by:
getDiskBytesSpilled
in interfaceTaskMetric
- Returns:
- the number of bytes spilled to disk
-
setExecutorRunTime
public void setExecutorRunTime(long time)
Description copied from interface:TaskMetric
Sets the total time taken by the task executor to run.- Specified by:
setExecutorRunTime
in interfaceTaskMetric
- Parameters:
time
- the time taken by the executor to run
-
getexecutorRunTime
public long getexecutorRunTime()
Description copied from interface:TaskMetric
Gets the total time taken by the task executor to run.- Specified by:
getexecutorRunTime
in interfaceTaskMetric
- Returns:
- the time taken by the executor to run
-
setjvmGCTime
public void setjvmGCTime(long time)
Description copied from interface:TaskMetric
Sets the amount of time spent by the JVM on garbage collection.- Specified by:
setjvmGCTime
in interfaceTaskMetric
- Parameters:
time
- the amount of time spent on garbage collection
-
getJVMGCTime
public long getJVMGCTime()
Description copied from interface:TaskMetric
Gets the amount of time spent by the JVM on garbage collection.- Specified by:
getJVMGCTime
in interfaceTaskMetric
- Returns:
- the amount of time spent on garbage collection
-
setPeakExecutionMemory
public void setPeakExecutionMemory(long peakExecutionMemory)
Description copied from interface:TaskMetric
Sets the peak execution memory used by the task executor.- Specified by:
setPeakExecutionMemory
in interfaceTaskMetric
- Parameters:
peakExecutionMemory
- the peak execution memory used by the executor
-
getPeakExecutionMemory
public long getPeakExecutionMemory()
Description copied from interface:TaskMetric
Gets the peak execution memory used by the task executor.- Specified by:
getPeakExecutionMemory
in interfaceTaskMetric
- Returns:
- the peak execution memory used by the executor
-
setResultSize
public void setResultSize(long resultSize)
Description copied from interface:TaskMetric
Sets the size of the result produced by the task.- Specified by:
setResultSize
in interfaceTaskMetric
- Parameters:
resultSize
- the size of the result produced
-
getResultSize
public long getResultSize()
Description copied from interface:TaskMetric
Gets the size of the result produced by the task.- Specified by:
getResultSize
in interfaceTaskMetric
- Returns:
- the size of the result produced
-
setResultSerializationTime
public void setResultSerializationTime(long resultSerializationTime)
Description copied from interface:TaskMetric
Sets the time taken to serialize the result of the task.- Specified by:
setResultSerializationTime
in interfaceTaskMetric
- Parameters:
resultSerializationTime
- the time taken to serialize the result
-
getResultSerializationTime
public long getResultSerializationTime()
Description copied from interface:TaskMetric
Returns the time taken to serialize the result of the task.- Specified by:
getResultSerializationTime
in interfaceTaskMetric
- Returns:
- the time taken to serialize the result
-
setRecordsWritten
public void setRecordsWritten(long recordsWritten)
Description copied from interface:TaskMetric
Sets the number of records written by the task.- Specified by:
setRecordsWritten
in interfaceTaskMetric
- Parameters:
recordsWritten
- the number of records written
-
getRecordsWrittern
public long getRecordsWrittern()
Description copied from interface:TaskMetric
Returns the number of records written by the task.- Specified by:
getRecordsWrittern
in interfaceTaskMetric
- Returns:
- the number of records written
-
setBytesWritten
public void setBytesWritten(long bytesWritten)
Description copied from interface:TaskMetric
Sets the number of bytes written by the task.- Specified by:
setBytesWritten
in interfaceTaskMetric
- Parameters:
bytesWritten
- the number of bytes written
-
getBytesWrittern
public long getBytesWrittern()
Description copied from interface:TaskMetric
Returns the number of bytes written by the task.- Specified by:
getBytesWrittern
in interfaceTaskMetric
- Returns:
- the number of bytes written
-
-