diff --git a/core/src/main/scala/spark/executor/TaskMetrics.scala b/core/src/main/scala/spark/executor/TaskMetrics.scala index 800305cd6c2673109a47636064255ac0e91c5750..b9c07830f5c94a62440a7b53fb81721a5c0400e6 100644 --- a/core/src/main/scala/spark/executor/TaskMetrics.scala +++ b/core/src/main/scala/spark/executor/TaskMetrics.scala @@ -1,14 +1,16 @@ package spark.executor -class TaskMetrics{ +class TaskMetrics extends Serializable { /** * Time taken on the executor to deserialize this task */ var executorDeserializeTime: Int = _ + /** * Time the executor spends actually running the task (including fetching shuffle data) */ var executorRunTime:Int = _ + /** * The number of bytes this task transmitted back to the driver as the TaskResult */ @@ -23,49 +25,54 @@ class TaskMetrics{ * If this task writes to shuffle output, metrics on the written shuffle data will be collected here */ var shuffleWriteMetrics: Option[ShuffleWriteMetrics] = None - } object TaskMetrics { - private[spark] def empty() : TaskMetrics = new TaskMetrics + private[spark] def empty(): TaskMetrics = new TaskMetrics } -class ShuffleReadMetrics { +class ShuffleReadMetrics extends Serializable { /** * Total number of blocks fetched in a shuffle (remote or local) */ var totalBlocksFetched : Int = _ + /** * Number of remote blocks fetched in a shuffle */ var remoteBlocksFetched: Int = _ + /** * Local blocks fetched in a shuffle */ var localBlocksFetched: Int = _ + /** * Total time to read shuffle data */ var shuffleReadMillis: Long = _ + /** * Total time that is spent blocked waiting for shuffle to fetch remote data */ var remoteFetchWaitTime: Long = _ + /** * The total amount of time for all the shuffle fetches. This adds up time from overlapping * shuffles, so can be longer than task time */ var remoteFetchTime: Long = _ + /** * Total number of remote bytes read from a shuffle */ var remoteBytesRead: Long = _ } -class ShuffleWriteMetrics { +class ShuffleWriteMetrics extends Serializable { /** * Number of bytes written for a shuffle */ var shuffleBytesWritten: Long = _ -} \ No newline at end of file +}