-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-4598][WebUI]Task table pagination for the Stage page #7399
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
Closed
Closed
Changes from 1 commit
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
db6c859
Task table pagination for the Stage page
zsxwing 74285fa
Merge branch 'master' into task-table-pagination
zsxwing d9285f0
Add comments and fix the style
zsxwing 4d4fecf
Address Carson's comments
zsxwing 894a342
Show the link cursor when hovering for headers and page links and oth…
zsxwing b123f67
Use localStorage to remember the user's actions and replay them when …
zsxwing a0746d1
Use expand-dag-viz-arrow-job and expand-dag-viz-arrow-stage instead o…
zsxwing 410586b
Scroll down to the tasks table if the url contains any sort column
zsxwing bad52eb
Display user-friendly error messages
zsxwing c2f7f39
Add a text field to let users fill the page size
zsxwing 54c5b84
Reset page to 1 if the user changes the page size
zsxwing a3eee22
Add extra space for the error message
zsxwing 144f513
Display the page navigation when the page number is out of range
zsxwing File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Merge branch 'master' into task-table-pagination
- Loading branch information
commit 74285fadb8675c14b033b156f1d9970754f34e65
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -660,33 +660,33 @@ private[ui] class StagePage(parent: StagesTab) extends WebUIPage("stage") { | |
| } | ||
|
|
||
| private[ui] object StagePage { | ||
| private[ui] def getGettingResultTime(info: TaskInfo): Long = { | ||
| if (info.gettingResultTime > 0) { | ||
| if (info.finishTime > 0) { | ||
| private[ui] def getGettingResultTime(info: TaskInfo, currentTime: Long): Long = { | ||
| if (info.gettingResult) { | ||
| if (info.finished) { | ||
| info.finishTime - info.gettingResultTime | ||
| } else { | ||
| // The task is still fetching the result. | ||
| System.currentTimeMillis - info.gettingResultTime | ||
| currentTime - info.gettingResultTime | ||
| } | ||
| } else { | ||
| 0L | ||
| } | ||
| } | ||
|
|
||
| private[ui] def getSchedulerDelay(info: TaskInfo, metrics: TaskMetrics): Long = { | ||
| val totalExecutionTime = | ||
| if (info.gettingResult) { | ||
| info.gettingResultTime - info.launchTime | ||
| } else if (info.finished) { | ||
| info.finishTime - info.launchTime | ||
| } else { | ||
| 0 | ||
| } | ||
| val executorOverhead = (metrics.executorDeserializeTime + | ||
| metrics.resultSerializationTime) | ||
| math.max( | ||
| 0, | ||
| totalExecutionTime - metrics.executorRunTime - executorOverhead - getGettingResultTime(info)) | ||
| private[ui] def getSchedulerDelay( | ||
| info: TaskInfo, metrics: TaskMetrics, currentTime: Long): Long = { | ||
| if (info.finished) { | ||
| val totalExecutionTime = info.finishTime - info.launchTime | ||
| val executorOverhead = (metrics.executorDeserializeTime + | ||
| metrics.resultSerializationTime) | ||
| math.max( | ||
| 0, | ||
| totalExecutionTime - metrics.executorRunTime - executorOverhead - | ||
| getGettingResultTime(info, currentTime)) | ||
| } else { | ||
| // The task is still running and the metrics like executorRunTime are not available. | ||
| 0L | ||
| } | ||
| } | ||
| } | ||
|
|
||
|
|
@@ -763,15 +763,16 @@ private[ui] class TaskDataSource( | |
| else metrics.map(_.executorRunTime).getOrElse(1L) | ||
| val formatDuration = if (info.status == "RUNNING") UIUtils.formatDuration(duration) | ||
| else metrics.map(m => UIUtils.formatDuration(m.executorRunTime)).getOrElse("") | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Indentation |
||
| val schedulerDelay = metrics.map(getSchedulerDelay(info, _)).getOrElse(0L) | ||
| val schedulerDelay = metrics.map(getSchedulerDelay(info, _, currentTime)).getOrElse(0L) | ||
| val gcTime = metrics.map(_.jvmGCTime).getOrElse(0L) | ||
| val taskDeserializationTime = metrics.map(_.executorDeserializeTime).getOrElse(0L) | ||
| val serializationTime = metrics.map(_.resultSerializationTime).getOrElse(0L) | ||
| val gettingResultTime = getGettingResultTime(info) | ||
| val gettingResultTime = getGettingResultTime(info, currentTime) | ||
|
|
||
| val maybeAccumulators = info.accumulables | ||
| val accumulatorsReadable = maybeAccumulators.map{acc => | ||
| StringEscapeUtils.escapeHtml4(s"${acc.name}: ${acc.update.get}")} | ||
| val accumulatorsReadable = maybeAccumulators.map { acc => | ||
| StringEscapeUtils.escapeHtml4(s"${acc.name}: ${acc.update.get}") | ||
| } | ||
|
|
||
| val maybeInput = metrics.flatMap(_.inputMetrics) | ||
| val inputSortable = maybeInput.map(_.bytesRead.toString).getOrElse("") | ||
|
|
||
You are viewing a condensed version of this merge commit. You can view the full changes here.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Indentation