Skip to content

Commit b47a574

Browse files
committed
Add comments
1 parent 0c6d0c5 commit b47a574

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

core/src/main/scala/org/apache/spark/status/api/v1/ExecutorListResource.scala

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ private[v1] class ExecutorListResource(ui: SparkUI) {
2929
def executorList(): Seq[ExecutorSummary] = {
3030
val listener = ui.executorsListener
3131
listener.synchronized {
32+
// The follow codes should be protected by `listener` to make sure no executors will be
33+
// removed before we query their status. See SPARK-12784.
3234
val storageStatusList = listener.storageStatusList
3335
(0 until storageStatusList.size).map { statusId =>
3436
ExecutorsPage.getExecInfo(listener, statusId)

core/src/main/scala/org/apache/spark/ui/exec/ExecutorsPage.scala

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,8 @@ private[ui] class ExecutorsPage(
5353

5454
def render(request: HttpServletRequest): Seq[Node] = {
5555
val (storageStatusList, execInfo) = listener.synchronized {
56+
// The follow codes should be protected by `listener` to make sure no executors will be
57+
// removed before we query their status. See SPARK-12784.
5658
val _storageStatusList = listener.storageStatusList
5759
val _execInfo = {
5860
for (statusId <- 0 until _storageStatusList.size)

0 commit comments

Comments
 (0)