@@ -22,12 +22,12 @@ import org.apache.spark.util.{TaskCompletionListener, TaskCompletionListenerExce
2222
2323import scala .collection .mutable .ArrayBuffer
2424
25- private [spark] class TaskContextImpl (_stageId : Int ,
26- _partitionId : Int ,
27- _attemptId : Long ,
28- _runningLocally : Boolean = false ,
29- _taskMetrics : TaskMetrics = TaskMetrics .empty)
30- extends TaskContext (_stageId, _partitionId, _attemptId, _runningLocally, _taskMetrics )
25+ private [spark] class TaskContextImpl (val stageId : Int ,
26+ val partitionId : Int ,
27+ val attemptId : Long ,
28+ val runningLocally : Boolean = false ,
29+ val taskMetrics : TaskMetrics = TaskMetrics .empty)
30+ extends TaskContext (stageId, partitionId, attemptId, runningLocally, taskMetrics )
3131 with Logging {
3232
3333 // List of callback functions to execute when the task completes.
@@ -84,19 +84,8 @@ private[spark] class TaskContextImpl(_stageId: Int,
8484
8585 override def isCompleted : Boolean = completed
8686
87- override def taskMetrics (): TaskMetrics = _taskMetrics
88-
89- override def isRunningLocally : Boolean = _runningLocally
90-
91- override def runningLocally (): Boolean = _runningLocally
87+ override def isRunningLocally : Boolean = runningLocally
9288
9389 override def isInterrupted : Boolean = interrupted
94-
95- override def partitionId (): Int = _partitionId
96-
97- override def attemptId (): Long = _attemptId
98-
99- override def stageId (): Int = _stageId
100-
10190}
10291
0 commit comments