Skip to content

Commit b176014

Browse files
Ngone51Marcelo Vanzin
authored andcommitted
[SPARK-22847][CORE] Remove redundant code in AppStatusListener while assigning schedulingPool for stage
## What changes were proposed in this pull request? In AppStatusListener's onStageSubmitted(event: SparkListenerStageSubmitted) method, there are duplicate code: ``` // schedulingPool was assigned twice with the same code stage.schedulingPool = Option(event.properties).flatMap { p => Option(p.getProperty("spark.scheduler.pool")) }.getOrElse(SparkUI.DEFAULT_POOL_NAME) ... ... ... stage.schedulingPool = Option(event.properties).flatMap { p => Option(p.getProperty("spark.scheduler.pool")) }.getOrElse(SparkUI.DEFAULT_POOL_NAME) ``` But, it does not make any sense to do this and there are no comment to explain for this. ## How was this patch tested? N/A Author: wuyi <[email protected]> Closes #20033 from Ngone51/dev-spark-22847.
1 parent 792915c commit b176014

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

core/src/main/scala/org/apache/spark/status/AppStatusListener.scala

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -329,10 +329,6 @@ private[spark] class AppStatusListener(
329329
.toSeq
330330
stage.jobIds = stage.jobs.map(_.jobId).toSet
331331

332-
stage.schedulingPool = Option(event.properties).flatMap { p =>
333-
Option(p.getProperty("spark.scheduler.pool"))
334-
}.getOrElse(SparkUI.DEFAULT_POOL_NAME)
335-
336332
stage.description = Option(event.properties).flatMap { p =>
337333
Option(p.getProperty(SparkContext.SPARK_JOB_DESCRIPTION))
338334
}

0 commit comments

Comments
 (0)