Skip to content
This repository was archived by the owner on May 9, 2024. It is now read-only.

Commit 517b6e5

Browse files
committed
get rid of SparkIllegalStateException
1 parent b2faef5 commit 517b6e5

File tree

3 files changed

+3
-13
lines changed

3 files changed

+3
-13
lines changed

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

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,3 @@ class SparkException(message: String, cause: Throwable)
3030
*/
3131
private[spark] class SparkDriverExecutionException(cause: Throwable)
3232
extends SparkException("Execution error", cause)
33-
34-
/**
35-
* Exception indicating an error internal to Spark -- it is in an inconsistent state, not due
36-
* to any error by the user
37-
*/
38-
class SparkIllegalStateException(message: String, cause: Throwable)
39-
extends SparkException(message, cause) {
40-
41-
def this(message: String) = this(message, null)
42-
}

core/src/main/scala/org/apache/spark/scheduler/TaskSchedulerImpl.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ private[spark] class TaskSchedulerImpl(
171171
ts.taskSet != taskSet && !ts.isZombie
172172
}
173173
if (conflictingTaskSet) {
174-
throw new SparkIllegalStateException(s"more than one active taskSet for stage $stage:" +
174+
throw new IllegalStateException(s"more than one active taskSet for stage $stage:" +
175175
s" ${stageTaskSets.toSeq.map{_._2.taskSet.id}.mkString(",")}")
176176
}
177177
schedulableBuilder.addTaskSetManager(manager, manager.taskSet.properties)

core/src/test/scala/org/apache/spark/scheduler/TaskSchedulerImplSuite.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,13 +141,13 @@ class TaskSchedulerImplSuite extends SparkFunSuite with LocalSparkContext with L
141141
val attempt1 = new TaskSet(Array(new FakeTask(0)), 0, 0, 0, null)
142142
val attempt2 = new TaskSet(Array(new FakeTask(0)), 0, 1, 0, null)
143143
taskScheduler.submitTasks(attempt1)
144-
intercept[SparkIllegalStateException] { taskScheduler.submitTasks(attempt2) }
144+
intercept[IllegalStateException] { taskScheduler.submitTasks(attempt2) }
145145

146146
// OK to submit multiple if previous attempts are all zombie
147147
taskScheduler.activeTaskSets(attempt1.id).isZombie = true
148148
taskScheduler.submitTasks(attempt2)
149149
val attempt3 = new TaskSet(Array(new FakeTask(0)), 0, 2, 0, null)
150-
intercept[SparkIllegalStateException] { taskScheduler.submitTasks(attempt3) }
150+
intercept[IllegalStateException] { taskScheduler.submitTasks(attempt3) }
151151
taskScheduler.activeTaskSets(attempt2.id).isZombie = true
152152
taskScheduler.submitTasks(attempt3)
153153
}

0 commit comments

Comments
 (0)