From 4aa0ba1df7336ab5066be58c208e8b1eb69864df Mon Sep 17 00:00:00 2001 From: Aaron Davidson Date: Mon, 21 Oct 2013 12:19:15 -0700 Subject: Remove executorId from Task.run() --- core/src/main/scala/org/apache/spark/executor/Executor.scala | 2 +- core/src/main/scala/org/apache/spark/scheduler/Task.scala | 2 +- core/src/test/scala/org/apache/spark/scheduler/TaskContextSuite.scala | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'core') diff --git a/core/src/main/scala/org/apache/spark/executor/Executor.scala b/core/src/main/scala/org/apache/spark/executor/Executor.scala index eb12c26d24..032eb04f43 100644 --- a/core/src/main/scala/org/apache/spark/executor/Executor.scala +++ b/core/src/main/scala/org/apache/spark/executor/Executor.scala @@ -206,7 +206,7 @@ private[spark] class Executor( // Run the actual task and measure its runtime. taskStart = System.currentTimeMillis() - val value = task.run(taskId.toInt, executorId) + val value = task.run(taskId.toInt) val taskFinish = System.currentTimeMillis() // If the task has been killed, let's fail it. diff --git a/core/src/main/scala/org/apache/spark/scheduler/Task.scala b/core/src/main/scala/org/apache/spark/scheduler/Task.scala index 1b66e7268e..69b42e86ea 100644 --- a/core/src/main/scala/org/apache/spark/scheduler/Task.scala +++ b/core/src/main/scala/org/apache/spark/scheduler/Task.scala @@ -45,7 +45,7 @@ import org.apache.spark.util.ByteBufferInputStream */ private[spark] abstract class Task[T](val stageId: Int, var partitionId: Int) extends Serializable { - final def run(attemptId: Long, executorId: String): T = { + final def run(attemptId: Long): T = { context = new TaskContext(stageId, partitionId, attemptId, runningLocally = false) if (_killed) { kill() diff --git a/core/src/test/scala/org/apache/spark/scheduler/TaskContextSuite.scala b/core/src/test/scala/org/apache/spark/scheduler/TaskContextSuite.scala index 668cd5d489..e31a116a75 100644 --- a/core/src/test/scala/org/apache/spark/scheduler/TaskContextSuite.scala +++ b/core/src/test/scala/org/apache/spark/scheduler/TaskContextSuite.scala @@ -40,7 +40,7 @@ class TaskContextSuite extends FunSuite with BeforeAndAfter with LocalSparkConte val func = (c: TaskContext, i: Iterator[String]) => i.next val task = new ResultTask[String, String](0, rdd, func, 0, Seq(), 0) intercept[RuntimeException] { - task.run(0, "test") + task.run(0) } assert(completed === true) } -- cgit v1.2.3