-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-17843][Web UI] Indicate event logs pending for processing on history server UI #15410
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
7895280
f0ca088
1144440
596c7ae
46357ee
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| /* | ||
| * Licensed to the Apache Software Foundation (ASF) under one or more | ||
| * contributor license agreements. See the NOTICE file distributed with | ||
| * this work for additional information regarding copyright ownership. | ||
| * The ASF licenses this file to You under the Apache License, Version 2.0 | ||
| * (the "License"); you may not use this file except in compliance with | ||
| * the License. You may obtain a copy of the License at | ||
| * | ||
| * http://www.apache.org/licenses/LICENSE-2.0 | ||
| * | ||
| * Unless required by applicable law or agreed to in writing, software | ||
| * distributed under the License is distributed on an "AS IS" BASIS, | ||
| * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| * See the License for the specific language governing permissions and | ||
| * limitations under the License. | ||
| */ | ||
|
|
||
| $(document).ready(function() { | ||
| if ($('#last-updated').length) { | ||
| var lastUpdatedMillis = Number($('#last-updated').text()); | ||
| var updatedDate = new Date(lastUpdatedMillis); | ||
| $('#last-updated').text(updatedDate.toLocaleDateString()+", "+updatedDate.toLocaleTimeString()) | ||
| } | ||
| }); |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -30,13 +30,30 @@ private[history] class HistoryPage(parent: HistoryServer) extends WebUIPage("") | |
| Option(request.getParameter("showIncomplete")).getOrElse("false").toBoolean | ||
|
|
||
| val allAppsSize = parent.getApplicationList().count(_.completed != requestedIncomplete) | ||
| val eventLogsUnderProcessCount = parent.getEventLogsUnderProcess() | ||
| val lastUpdatedTime = parent.getLastUpdatedTime() | ||
| val providerConfig = parent.getProviderConfig() | ||
| val content = | ||
| <script src={UIUtils.prependBaseUri("/static/historypage-common.js")}></script> | ||
| <div> | ||
| <div class="span12"> | ||
| <ul class="unstyled"> | ||
| {providerConfig.map { case (k, v) => <li><strong>{k}:</strong> {v}</li> }} | ||
| </ul> | ||
| { | ||
| if (eventLogsUnderProcessCount > 0) { | ||
| <p>There are {eventLogsUnderProcessCount} event log(s) currently being | ||
| processed which may result in additional applications getting listed on this page. | ||
| Refresh the page to view updates. </p> | ||
| } | ||
| } | ||
|
|
||
| { | ||
| if (lastUpdatedTime > 0) { | ||
| <p>Last updated: <span id="last-updated">{lastUpdatedTime}</span></p> | ||
| } | ||
| } | ||
|
|
||
| { | ||
| if (allAppsSize > 0) { | ||
| <script src={UIUtils.prependBaseUri("/static/dataTables.rowsGroup.js")}></script> ++ | ||
|
|
@@ -46,6 +63,8 @@ private[history] class HistoryPage(parent: HistoryServer) extends WebUIPage("") | |
| <script>setAppLimit({parent.maxApplications})</script> | ||
| } else if (requestedIncomplete) { | ||
| <h4>No incomplete applications found!</h4> | ||
| } else if (eventLogsUnderProcessCount > 0) { | ||
| <h4>No completed applications found!</h4> | ||
|
||
| } else { | ||
| <h4>No completed applications found!</h4> ++ parent.emptyListingHtml | ||
| } | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a need for this step? Why can't we just
pendingReplayTasksCount.addAndGet(logInfos.size)below and only have to add thefinallycode block. This seems like a lot of unnecessary code change.Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the replayExecutor.submit can raise an exception resulting in fewer logInfos getting queued for replay. although one can argue that the underlying ExecutorService implementation used today will probably not do this, but I did not feel comfortable leaving this possibility out. note that - if there were to be an exception on the replayExecutor. submit( ) it would break not only the counting logic (assuming we'd already done a
pendingReplayTasksCount.addAndGet(logInfos.size)instead of only adding as many as got successfully submitted) but also the older one of preventing a new thread getting scheduled for "checkForLogs( )" while there are tasks already running in replayExecutor.however if there's a thought that we can completely ignore the possibility of exceptions on replayExecutor.submit( ), I can optimise the code on those lines. Let me know.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From my understanding the catch at the end of checkForLogs would stop any current issue, but without it your new counting code would break, so with the addition of the counting code this change makes sense.