Skip to content

Commit d9ab5a9

Browse files
committed
Response to Andrew's review
1 parent 7752449 commit d9ab5a9

File tree

4 files changed

+25
-25
lines changed

4 files changed

+25
-25
lines changed

core/src/main/scala/org/apache/spark/ui/ToolTips.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
package org.apache.spark.ui
1919

20-
object ToolTips {
20+
private[spark] object ToolTips {
2121
val SCHEDULER_DELAY =
2222
"""Scheduler delay includes time to ship the task from the scheduler to
2323
the executor, and time the time to send a message from the executor to the scheduler stating

core/src/main/scala/org/apache/spark/ui/UIUtils.scala

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -140,16 +140,17 @@ private[spark] object UIUtils extends Logging {
140140

141141
def prependBaseUri(basePath: String = "", resource: String = "") = uiRoot + basePath + resource
142142

143-
val commonHeaderNodes =
144-
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
145-
<link rel="stylesheet" href={prependBaseUri("/static/bootstrap.min.css")}
146-
type="text/css" />
147-
<link rel="stylesheet" href={prependBaseUri("/static/webui.css")}
148-
type="text/css" />
149-
<script src={prependBaseUri("/static/sorttable.js")} ></script>
150-
<script src={prependBaseUri("/static/jquery-1.11.1.min.js")}></script>
151-
<script src={prependBaseUri("/static/bootstrap-tooltip.js")}></script>
152-
<script src={prependBaseUri("/static/initialize-tooltips.js")}></script>
143+
val commonHeaderNodes = {
144+
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
145+
<link rel="stylesheet" href={prependBaseUri("/static/bootstrap.min.css")}
146+
type="text/css" />
147+
<link rel="stylesheet" href={prependBaseUri("/static/webui.css")}
148+
type="text/css" />
149+
<script src={prependBaseUri("/static/sorttable.js")} ></script>
150+
<script src={prependBaseUri("/static/jquery-1.11.1.min.js")}></script>
151+
<script src={prependBaseUri("/static/bootstrap-tooltip.js")}></script>
152+
<script src={prependBaseUri("/static/initialize-tooltips.js")}></script>
153+
}
153154

154155
/** Returns a spark page with correctly formatted headers */
155156
def headerSparkPage(

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

Lines changed: 10 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@ import org.apache.spark.storage.StorageLevel
2525
import org.apache.spark.ui.{ToolTips, UIUtils, WebUIPage}
2626
import org.apache.spark.util.Utils
2727

28-
private case class ExecutorInfo(
28+
/** Summary information about an executor to display in the UI. */
29+
private case class ExecutorSummaryInfo(
2930
id: String,
3031
hostPort: String,
3132
rddBlocks: Int,
@@ -67,17 +68,12 @@ private[ui] class ExecutorsPage(parent: ExecutorsTab) extends WebUIPage("") {
6768
<th>Complete Tasks</th>
6869
<th>Total Tasks</th>
6970
<th>Task Time</th>
71+
<th><span data-toggle="tooltip" title={ToolTips.INPUT}>Input</span></th>
72+
<th><span data-toggle="tooltip" title={ToolTips.SHUFFLE_READ}>Shuffle Read</span></th>
7073
<th>
71-
<span data-toggle="tooltip" title={ToolTips.INPUT}>
72-
Input
73-
</span>
74-
</th>
75-
<th>
76-
<span data-toggle="tooltip" title={ToolTips.SHUFFLE_READ}>
77-
Shuffle Read
78-
</span>
79-
</th>
80-
<th>
74+
<!-- Place the shuffle write tooltip on the left (rather than the default position
75+
of on top) because the shuffle write column is the last column on the right side and
76+
the tooltip is wider than the column, so it doesn't fit on top. -->
8177
<span data-toggle="tooltip" data-placement="left" title={ToolTips.SHUFFLE_WRITE}>
8278
Shuffle Write
8379
</span>
@@ -110,7 +106,7 @@ private[ui] class ExecutorsPage(parent: ExecutorsTab) extends WebUIPage("") {
110106
}
111107

112108
/** Render an HTML row representing an executor */
113-
private def execRow(info: ExecutorInfo): Seq[Node] = {
109+
private def execRow(info: ExecutorSummaryInfo): Seq[Node] = {
114110
val maximumMemory = info.maxMemory
115111
val memoryUsed = info.memoryUsed
116112
val diskUsed = info.diskUsed
@@ -145,7 +141,7 @@ private[ui] class ExecutorsPage(parent: ExecutorsTab) extends WebUIPage("") {
145141
}
146142

147143
/** Represent an executor's info as a map given a storage status index */
148-
private def getExecInfo(statusId: Int): ExecutorInfo = {
144+
private def getExecInfo(statusId: Int): ExecutorSummaryInfo = {
149145
val status = listener.storageStatusList(statusId)
150146
val execId = status.blockManagerId.executorId
151147
val hostPort = status.blockManagerId.hostPort
@@ -164,7 +160,7 @@ private[ui] class ExecutorsPage(parent: ExecutorsTab) extends WebUIPage("") {
164160
val totalShuffleRead = listener.executorToShuffleRead.getOrElse(execId, 0L)
165161
val totalShuffleWrite = listener.executorToShuffleWrite.getOrElse(execId, 0L)
166162

167-
new ExecutorInfo(
163+
new ExecutorSummaryInfo(
168164
execId,
169165
hostPort,
170166
rddBlocks,

core/src/main/scala/org/apache/spark/ui/jobs/StageTable.scala

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,9 @@ private[ui] class StageTableBase(
4646
<th><span data-toggle="tooltip" title={ToolTips.INPUT}>Input</span></th>
4747
<th><span data-toggle="tooltip" title={ToolTips.SHUFFLE_READ}>Shuffle Read</span></th>
4848
<th>
49+
<!-- Place the shuffle write tooltip on the left (rather than the default position
50+
of on top) because the shuffle write column is the last column on the right side and
51+
the tooltip is wider than the column, so it doesn't fit on top. -->
4952
<span data-toggle="tooltip" data-placement="left" title={ToolTips.SHUFFLE_WRITE}>
5053
Shuffle Write
5154
</span>

0 commit comments

Comments
 (0)