@@ -64,61 +64,61 @@ private[history] class HistoryPage(parent: HistoryServer) extends WebUIPage("")
64
64
{providerConfig.map { case (k, v) => <li ><strong >{k}:</ strong> {v}</li > }}
65
65
</ul >
66
66
{
67
- // This displays the indices of pages that are within `plusOrMinus` pages of
68
- // the current page. Regardless of where the current page is, this also links
69
- // to the first and last page. If the current page +/- `plusOrMinus` is greater
70
- // than the 2nd page from the first page or less than the 2nd page from the last
71
- // page, `...` will be displayed.
72
- if (allAppsSize > 0 ) {
73
- val leftSideIndices =
74
- rangeIndices(actualPage - plusOrMinus until actualPage, 1 < _, requestedIncomplete)
75
- val rightSideIndices =
76
- rangeIndices(actualPage + 1 to actualPage + plusOrMinus, _ < pageCount,
77
- requestedIncomplete)
78
-
79
- <h4 >
80
- Showing {actualFirst + 1 }- {last + 1 } of {allAppsSize}
81
- {if (requestedIncomplete) " (Incomplete applications)" }
82
- <span style =" float: right" >
83
- {
84
- if (actualPage > 1 ) {
85
- <a href ={makePageLink(actualPage - 1 , requestedIncomplete)}>< </a >
86
- <a href ={makePageLink(1 , requestedIncomplete)}>1 </a >
87
- }
88
- }
89
- {if (actualPage - plusOrMinus > secondPageFromLeft) " ... " }
90
- {leftSideIndices}
91
- {actualPage}
92
- {rightSideIndices}
93
- {if (actualPage + plusOrMinus < secondPageFromRight) " ... " }
94
- {
95
- if (actualPage < pageCount) {
96
- <a href ={makePageLink(pageCount, requestedIncomplete)}>{pageCount}</a >
97
- <a href ={makePageLink(actualPage + 1 , requestedIncomplete)}> > </a >
98
- }
99
- }
100
- </span >
101
- </h4 > ++
67
+ // This displays the indices of pages that are within `plusOrMinus` pages of
68
+ // the current page. Regardless of where the current page is, this also links
69
+ // to the first and last page. If the current page +/- `plusOrMinus` is greater
70
+ // than the 2nd page from the first page or less than the 2nd page from the last
71
+ // page, `...` will be displayed.
72
+ if (allAppsSize > 0 ) {
73
+ val leftSideIndices =
74
+ rangeIndices(actualPage - plusOrMinus until actualPage, 1 < _, requestedIncomplete)
75
+ val rightSideIndices =
76
+ rangeIndices(actualPage + 1 to actualPage + plusOrMinus, _ < pageCount,
77
+ requestedIncomplete)
78
+
79
+ <h4 >
80
+ Showing {actualFirst + 1 }- {last + 1 } of {allAppsSize}
81
+ {if (requestedIncomplete) " (Incomplete applications)" }
82
+ <span style =" float: right" >
83
+ {
84
+ if (actualPage > 1 ) {
85
+ <a href ={makePageLink(actualPage - 1 , requestedIncomplete)}>< </a >
86
+ <a href ={makePageLink(1 , requestedIncomplete)}>1 </a >
87
+ }
88
+ }
89
+ {if (actualPage - plusOrMinus > secondPageFromLeft) " ... " }
90
+ {leftSideIndices}
91
+ {actualPage}
92
+ {rightSideIndices}
93
+ {if (actualPage + plusOrMinus < secondPageFromRight) " ... " }
94
+ {
95
+ if (actualPage < pageCount) {
96
+ <a href ={makePageLink(pageCount, requestedIncomplete)}>{pageCount}</a >
97
+ <a href ={makePageLink(actualPage + 1 , requestedIncomplete)}> > </a >
98
+ }
99
+ }
100
+ </span >
101
+ </h4 > ++
102
102
appTable
103
- } else if (requestedIncomplete) {
104
- <h4 >No incomplete applications found!</ h4>
105
- } else {
106
- <h4 >No completed applications found!</ h4> ++
103
+ } else if (requestedIncomplete) {
104
+ <h4 >No incomplete applications found!</ h4>
105
+ } else {
106
+ <h4 >No completed applications found!</ h4> ++
107
107
<p >Did you specify the correct logging directory?
108
108
Please verify your setting of <span style =" font-style:italic" >
109
109
spark.history.fs.logDirectory</span > and whether you have the permissions to
110
110
access it.<br /> It is also possible that your application did not run to
111
111
completion or did not stop the SparkContext .
112
112
</p >
113
- }
113
+ }
114
114
}
115
115
<a href ={makePageLink(actualPage, ! requestedIncomplete)}>
116
116
{
117
- if (requestedIncomplete) {
118
- " Back to completed applications"
119
- } else {
120
- " Show incomplete applications"
121
- }
117
+ if (requestedIncomplete) {
118
+ " Back to completed applications"
119
+ } else {
120
+ " Show incomplete applications"
121
+ }
122
122
}
123
123
</a >
124
124
</div >
@@ -146,18 +146,18 @@ private[history] class HistoryPage(parent: HistoryServer) extends WebUIPage("")
146
146
" Last Updated" )
147
147
148
148
private def rangeIndices (
149
- range : Seq [Int ],
150
- condition : Int => Boolean ,
151
- showIncomplete : Boolean ): Seq [Node ] = {
149
+ range : Seq [Int ],
150
+ condition : Int => Boolean ,
151
+ showIncomplete : Boolean ): Seq [Node ] = {
152
152
range.filter(condition).map(nextPage =>
153
153
<a href ={makePageLink(nextPage, showIncomplete)}> {nextPage} </a >)
154
154
}
155
155
156
156
private def attemptRow (
157
- renderAttemptIdColumn : Boolean ,
158
- info : ApplicationHistoryInfo ,
159
- attempt : ApplicationAttemptInfo ,
160
- isFirst : Boolean ): Seq [Node ] = {
157
+ renderAttemptIdColumn : Boolean ,
158
+ info : ApplicationHistoryInfo ,
159
+ attempt : ApplicationAttemptInfo ,
160
+ isFirst : Boolean ): Seq [Node ] = {
161
161
val uiAddress = HistoryServer .getAttemptURI(info.id, attempt.attemptId)
162
162
val startTime = UIUtils .formatDate(attempt.startTime)
163
163
val endTime = if (attempt.endTime > 0 ) UIUtils .formatDate(attempt.endTime) else " -"
@@ -170,31 +170,31 @@ private[history] class HistoryPage(parent: HistoryServer) extends WebUIPage("")
170
170
val lastUpdated = UIUtils .formatDate(attempt.lastUpdated)
171
171
<tr >
172
172
{
173
- if (isFirst) {
174
- if (info.attempts.size > 1 || renderAttemptIdColumn) {
175
- <td rowspan ={info.attempts.size.toString} style =" background-color: #ffffff" >
176
- <a href ={uiAddress}>{info.id}</a ></td >
173
+ if (isFirst) {
174
+ if (info.attempts.size > 1 || renderAttemptIdColumn) {
175
+ <td rowspan ={info.attempts.size.toString} style =" background-color: #ffffff" >
176
+ <a href ={uiAddress}>{info.id}</a ></td >
177
177
<td rowspan ={info.attempts.size.toString} style =" background-color: #ffffff" >
178
178
{info.name}</td >
179
- } else {
180
- <td ><a href ={uiAddress}>{info.id}</a ></td >
179
+ } else {
180
+ <td ><a href ={uiAddress}>{info.id}</a ></td >
181
181
<td >{info.name}</td >
182
+ }
183
+ } else {
184
+ Nil
182
185
}
183
- } else {
184
- Nil
185
- }
186
186
}
187
187
{
188
- if (renderAttemptIdColumn) {
189
- if (info.attempts.size > 1 && attempt.attemptId.isDefined) {
190
- <td ><a href ={HistoryServer .getAttemptURI(info.id, attempt.attemptId)}>
191
- {attempt.attemptId.get}</a ></td >
188
+ if (renderAttemptIdColumn) {
189
+ if (info.attempts.size > 1 && attempt.attemptId.isDefined) {
190
+ <td ><a href ={HistoryServer .getAttemptURI(info.id, attempt.attemptId)}>
191
+ {attempt.attemptId.get}</a ></td >
192
+ } else {
193
+ <td > </td >
194
+ }
192
195
} else {
193
- < td > </ td >
196
+ Nil
194
197
}
195
- } else {
196
- Nil
197
- }
198
198
}
199
199
<td sorttable_customkey ={attempt.startTime.toString}>{startTime}</td >
200
200
<td sorttable_customkey ={attempt.endTime.toString}>{endTime}</td >
0 commit comments