File tree Expand file tree Collapse file tree 1 file changed +8
-7
lines changed
core/src/main/scala/org/apache/spark/deploy/history Expand file tree Collapse file tree 1 file changed +8
-7
lines changed Original file line number Diff line number Diff line change @@ -148,19 +148,20 @@ class HistoryServer(
148148 appId : String ,
149149 attemptId : Option [String ],
150150 ui : SparkUI ,
151- completed : Boolean ): Unit = this . synchronized {
151+ completed : Boolean ) {
152152 assert(serverInfo.isDefined, " HistoryServer must be bound before attaching SparkUIs" )
153- ui.getHandlers.foreach(attachHandler)
153+ handlers.synchronized {
154+ ui.getHandlers.foreach(attachHandler)
155+ }
154156 addFilters(ui.getHandlers, conf)
155157 }
156158
157159 /** Detach a reconstructed UI from this server. Only valid after bind(). */
158- override def detachSparkUI (
159- appId : String ,
160- attemptId : Option [String ],
161- ui : SparkUI ): Unit = this .synchronized {
160+ override def detachSparkUI (appId : String , attemptId : Option [String ], ui : SparkUI ): Unit = {
162161 assert(serverInfo.isDefined, " HistoryServer must be bound before detaching SparkUIs" )
163- ui.getHandlers.foreach(detachHandler)
162+ handlers.synchronized {
163+ ui.getHandlers.foreach(detachHandler)
164+ }
164165 provider.onUIDetached(appId, attemptId, ui)
165166 }
166167
You can’t perform that action at this time.
0 commit comments