Interface TaskMetric
- All Superinterfaces:
Serializable
- All Known Implementing Classes:
TaskMetric
The TaskMetric interface defines the methods used to set and retrieve
performance metrics for a given task.
-
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.longGets 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.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.
-
Method Details
-
setBytesRead
void setBytesRead(long bytesRead) Sets the number of bytes read by the task.- Parameters:
bytesRead- the number of bytes read
-
getByteRead
long getByteRead()Gets the number of bytes read by the task.- Returns:
- the number of bytes read
-
setExecutorDeserializeCpuTime
void setExecutorDeserializeCpuTime(long executorDeserializeCpuTime) Sets the CPU time used for deserializing the task executor.- Parameters:
executorDeserializeCpuTime- the CPU time used for deserializing the executor
-
getExecutorDeserializeCpuTime
long getExecutorDeserializeCpuTime()Gets the CPU time used for deserializing the task executor.- Returns:
- the CPU time used for deserializing the executor
-
setExecutorDeserializeTime
void setExecutorDeserializeTime(long executorDeserializeTime) Sets the time taken to deserialize the task executor.- Parameters:
executorDeserializeTime- the time taken to deserialize the executor
-
getExecutorDeserializeTime
long getExecutorDeserializeTime()Gets the time taken to deserialize the task executor.- Returns:
- the time taken to deserialize the executor
-
setDiskBytesSpilled
void setDiskBytesSpilled(long DiskByteSpilled) Sets the number of bytes spilled to disk by the task.- Parameters:
DiskByteSpilled- the number of bytes spilled to disk
-
getDiskBytesSpilled
long getDiskBytesSpilled()Gets the number of bytes spilled to disk by the task.- Returns:
- the number of bytes spilled to disk
-
setExecutorRunTime
void setExecutorRunTime(long time) Sets the total time taken by the task executor to run.- Parameters:
time- the time taken by the executor to run
-
getexecutorRunTime
long getexecutorRunTime()Gets the total time taken by the task executor to run.- Returns:
- the time taken by the executor to run
-
setjvmGCTime
void setjvmGCTime(long time) Sets the amount of time spent by the JVM on garbage collection.- Parameters:
time- the amount of time spent on garbage collection
-
getJVMGCTime
long getJVMGCTime()Gets the amount of time spent by the JVM on garbage collection.- Returns:
- the amount of time spent on garbage collection
-
setPeakExecutionMemory
void setPeakExecutionMemory(long peakExecutionMemory) Sets the peak execution memory used by the task executor.- Parameters:
peakExecutionMemory- the peak execution memory used by the executor
-
getPeakExecutionMemory
long getPeakExecutionMemory()Gets the peak execution memory used by the task executor.- Returns:
- the peak execution memory used by the executor
-
setResultSize
void setResultSize(long resultSize) Sets the size of the result produced by the task.- Parameters:
resultSize- the size of the result produced
-
getResultSize
long getResultSize()Gets the size of the result produced by the task.- Returns:
- the size of the result produced
-
setResultSerializationTime
void setResultSerializationTime(long resultSerializationTime) Sets the time taken to serialize the result of the task.- Parameters:
resultSerializationTime- the time taken to serialize the result
-
getResultSerializationTime
long getResultSerializationTime()Returns the time taken to serialize the result of the task.- Returns:
- the time taken to serialize the result
-
setRecordsWritten
void setRecordsWritten(long recordsWritten) Sets the number of records written by the task.- Parameters:
recordsWritten- the number of records written
-
getRecordsWrittern
long getRecordsWrittern()Returns the number of records written by the task.- Returns:
- the number of records written
-
setBytesWritten
void setBytesWritten(long bytesWritten) Sets the number of bytes written by the task.- Parameters:
bytesWritten- the number of bytes written
-
getBytesWrittern
long getBytesWrittern()Returns the number of bytes written by the task.- Returns:
- the number of bytes written
-