Skip to content

Commit df261d0

Browse files
committed
Josh's suggestion
1 parent facf3b1 commit df261d0

File tree

1 file changed

+7
-18
lines changed

1 file changed

+7
-18
lines changed

core/src/main/scala/org/apache/spark/TaskContextImpl.scala

Lines changed: 7 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,12 @@ import org.apache.spark.util.{TaskCompletionListener, TaskCompletionListenerExce
2222

2323
import 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

Comments
 (0)