Class TaskMetric
java.lang.Object
org.apache.wayang.spark.monitoring.metrics.TaskMetric
- All Implemented Interfaces:
Serializable,SerializableObject,TaskMetric
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:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionlongGets the number of bytes read by the task.longReturns the number of bytes written by the task.longGets the number of bytes spilled to disk by the task.longlongGets the CPU time used for deserializing the task executor.longGets the time taken to deserialize the task executor.longGets the total time taken by the task executor to run.longGets the amount of time spent by the JVM on garbage collection.longGets the peak execution memory used by the task executor.longReturns the number of records written by the task.longReturns the time taken to serialize the result of the task.longGets the size of the result produced by the task.voidsetBytesRead(long bytesRead) Sets the number of bytes read by the task.voidsetBytesWritten(long bytesWritten) Sets the number of bytes written by the task.voidsetDiskBytesSpilled(long DiskByteSpilled) Sets the number of bytes spilled to disk by the task.voidsetExecutorCPUTime(long executorCPUTime) voidsetExecutorDeserializeCpuTime(long executorDeserializeCpuTime) Sets the CPU time used for deserializing the task executor.voidsetExecutorDeserializeTime(long executorDeserializeTime) Sets the time taken to deserialize the task executor.voidsetExecutorRunTime(long time) Sets the total time taken by the task executor to run.voidsetjvmGCTime(long time) Sets the amount of time spent by the JVM on garbage collection.voidsetPeakExecutionMemory(long peakExecutionMemory) Sets the peak execution memory used by the task executor.voidsetRecordsWritten(long recordsWritten) Sets the number of records written by the task.voidsetResultSerializationTime(long resultSerializationTime) Sets the time taken to serialize the result of the task.voidsetResultSize(long resultSize) Sets the size of the result produced by the task.
-
Constructor Details
-
TaskMetric
public TaskMetric()
-
-
Method Details
-
getExecutorCPUTime
public long getExecutorCPUTime() -
setExecutorCPUTime
public void setExecutorCPUTime(long executorCPUTime) -
setBytesRead
public void setBytesRead(long bytesRead) Description copied from interface:TaskMetricSets the number of bytes read by the task.- Specified by:
setBytesReadin interfaceTaskMetric- Parameters:
bytesRead- the number of bytes read
-
getByteRead
public long getByteRead()Description copied from interface:TaskMetricGets the number of bytes read by the task.- Specified by:
getByteReadin interfaceTaskMetric- Returns:
- the number of bytes read
-
setExecutorDeserializeCpuTime
public void setExecutorDeserializeCpuTime(long executorDeserializeCpuTime) Description copied from interface:TaskMetricSets the CPU time used for deserializing the task executor.- Specified by:
setExecutorDeserializeCpuTimein interfaceTaskMetric- Parameters:
executorDeserializeCpuTime- the CPU time used for deserializing the executor
-
getExecutorDeserializeCpuTime
public long getExecutorDeserializeCpuTime()Description copied from interface:TaskMetricGets the CPU time used for deserializing the task executor.- Specified by:
getExecutorDeserializeCpuTimein interfaceTaskMetric- Returns:
- the CPU time used for deserializing the executor
-
setExecutorDeserializeTime
public void setExecutorDeserializeTime(long executorDeserializeTime) Description copied from interface:TaskMetricSets the time taken to deserialize the task executor.- Specified by:
setExecutorDeserializeTimein interfaceTaskMetric- Parameters:
executorDeserializeTime- the time taken to deserialize the executor
-
getExecutorDeserializeTime
public long getExecutorDeserializeTime()Description copied from interface:TaskMetricGets the time taken to deserialize the task executor.- Specified by:
getExecutorDeserializeTimein interfaceTaskMetric- Returns:
- the time taken to deserialize the executor
-
setDiskBytesSpilled
public void setDiskBytesSpilled(long DiskByteSpilled) Description copied from interface:TaskMetricSets the number of bytes spilled to disk by the task.- Specified by:
setDiskBytesSpilledin interfaceTaskMetric- Parameters:
DiskByteSpilled- the number of bytes spilled to disk
-
getDiskBytesSpilled
public long getDiskBytesSpilled()Description copied from interface:TaskMetricGets the number of bytes spilled to disk by the task.- Specified by:
getDiskBytesSpilledin interfaceTaskMetric- Returns:
- the number of bytes spilled to disk
-
setExecutorRunTime
public void setExecutorRunTime(long time) Description copied from interface:TaskMetricSets the total time taken by the task executor to run.- Specified by:
setExecutorRunTimein interfaceTaskMetric- Parameters:
time- the time taken by the executor to run
-
getexecutorRunTime
public long getexecutorRunTime()Description copied from interface:TaskMetricGets the total time taken by the task executor to run.- Specified by:
getexecutorRunTimein interfaceTaskMetric- Returns:
- the time taken by the executor to run
-
setjvmGCTime
public void setjvmGCTime(long time) Description copied from interface:TaskMetricSets the amount of time spent by the JVM on garbage collection.- Specified by:
setjvmGCTimein interfaceTaskMetric- Parameters:
time- the amount of time spent on garbage collection
-
getJVMGCTime
public long getJVMGCTime()Description copied from interface:TaskMetricGets the amount of time spent by the JVM on garbage collection.- Specified by:
getJVMGCTimein interfaceTaskMetric- Returns:
- the amount of time spent on garbage collection
-
setPeakExecutionMemory
public void setPeakExecutionMemory(long peakExecutionMemory) Description copied from interface:TaskMetricSets the peak execution memory used by the task executor.- Specified by:
setPeakExecutionMemoryin interfaceTaskMetric- Parameters:
peakExecutionMemory- the peak execution memory used by the executor
-
getPeakExecutionMemory
public long getPeakExecutionMemory()Description copied from interface:TaskMetricGets the peak execution memory used by the task executor.- Specified by:
getPeakExecutionMemoryin interfaceTaskMetric- Returns:
- the peak execution memory used by the executor
-
setResultSize
public void setResultSize(long resultSize) Description copied from interface:TaskMetricSets the size of the result produced by the task.- Specified by:
setResultSizein interfaceTaskMetric- Parameters:
resultSize- the size of the result produced
-
getResultSize
public long getResultSize()Description copied from interface:TaskMetricGets the size of the result produced by the task.- Specified by:
getResultSizein interfaceTaskMetric- Returns:
- the size of the result produced
-
setResultSerializationTime
public void setResultSerializationTime(long resultSerializationTime) Description copied from interface:TaskMetricSets the time taken to serialize the result of the task.- Specified by:
setResultSerializationTimein interfaceTaskMetric- Parameters:
resultSerializationTime- the time taken to serialize the result
-
getResultSerializationTime
public long getResultSerializationTime()Description copied from interface:TaskMetricReturns the time taken to serialize the result of the task.- Specified by:
getResultSerializationTimein interfaceTaskMetric- Returns:
- the time taken to serialize the result
-
setRecordsWritten
public void setRecordsWritten(long recordsWritten) Description copied from interface:TaskMetricSets the number of records written by the task.- Specified by:
setRecordsWrittenin interfaceTaskMetric- Parameters:
recordsWritten- the number of records written
-
getRecordsWrittern
public long getRecordsWrittern()Description copied from interface:TaskMetricReturns the number of records written by the task.- Specified by:
getRecordsWritternin interfaceTaskMetric- Returns:
- the number of records written
-
setBytesWritten
public void setBytesWritten(long bytesWritten) Description copied from interface:TaskMetricSets the number of bytes written by the task.- Specified by:
setBytesWrittenin interfaceTaskMetric- Parameters:
bytesWritten- the number of bytes written
-
getBytesWrittern
public long getBytesWrittern()Description copied from interface:TaskMetricReturns the number of bytes written by the task.- Specified by:
getBytesWritternin interfaceTaskMetric- Returns:
- the number of bytes written
-