@@ -22,7 +22,7 @@ import org.apache.spark.TaskContext
2222class FakeTask (
2323 stageId : Int ,
2424 partitionId : Int ,
25- prefLocs : Seq [TaskLocation ] = Nil ) extends Task [Int ](stageId, 0 , partitionId) {
25+ prefLocs : Seq [TaskLocation ] = Nil ) extends Task [Int ](stageId, stageAttemptId = 0 , partitionId) {
2626 override def runTask (context : TaskContext ): Int = 0
2727 override def preferredLocations : Seq [TaskLocation ] = prefLocs
2828}
@@ -33,11 +33,11 @@ object FakeTask {
3333 * locations for each task (given as varargs) if this sequence is not empty.
3434 */
3535 def createTaskSet (numTasks : Int , prefLocs : Seq [TaskLocation ]* ): TaskSet = {
36- createTaskSet(numTasks, 0 , prefLocs : _* )
36+ createTaskSet(numTasks, stageAttemptId = 0 , prefLocs : _* )
3737 }
3838
3939 def createTaskSet (numTasks : Int , stageAttemptId : Int , prefLocs : Seq [TaskLocation ]* ): TaskSet = {
40- createTaskSet(numTasks, 0 , stageAttemptId, prefLocs : _* )
40+ createTaskSet(numTasks, stageId = 0 , stageAttemptId, prefLocs : _* )
4141 }
4242
4343 def createTaskSet (numTasks : Int , stageId : Int , stageAttemptId : Int , prefLocs : Seq [TaskLocation ]* ):
@@ -48,6 +48,6 @@ object FakeTask {
4848 val tasks = Array .tabulate[Task [_]](numTasks) { i =>
4949 new FakeTask (stageId, i, if (prefLocs.size != 0 ) prefLocs(i) else Nil )
5050 }
51- new TaskSet (tasks, stageId, stageAttemptId, 0 , null )
51+ new TaskSet (tasks, stageId, stageAttemptId, priority = 0 , null )
5252 }
5353}
0 commit comments