-
Notifications
You must be signed in to change notification settings - Fork 29.3k
[SPARK-21922] Fix duration always updating when task failed but status is still RUN… #19132
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 3 commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
03a33a9
Fix duration always updating when task failed but status is still RUN…
caneGuy a442000
Revert "Fix duration always updating when task failed but status is s…
caneGuy 8b47418
Do not access fs in SPARK-UI pass event log access time from FSHistor…
caneGuy 25fe22c
Update as commented
caneGuy 560d442
Update as commented
caneGuy f0e1ded
Make api more cleaner
caneGuy 8ec4319
Modify field name and update code style
caneGuy 06035f7
Update code style
caneGuy 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
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
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
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 |
|---|---|---|
|
|
@@ -50,6 +50,7 @@ private[spark] class SparkUI private ( | |
| val operationGraphListener: RDDOperationGraphListener, | ||
| var appName: String, | ||
| val basePath: String, | ||
| val lastUpdateTime: Long = -1L, | ||
|
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. I would like to user
Contributor
Author
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. Updated @jerryshao Thanks for your time. |
||
| val startTime: Long) | ||
| extends WebUI(securityManager, securityManager.getSSLOptions("ui"), SparkUI.getUIPort(conf), | ||
| conf, basePath, "SparkUI") | ||
|
|
@@ -176,9 +177,11 @@ private[spark] object SparkUI { | |
| securityManager: SecurityManager, | ||
| appName: String, | ||
| basePath: String, | ||
| lastUpdateTime: Long, | ||
| startTime: Long): SparkUI = { | ||
| val sparkUI = create( | ||
| None, conf, listenerBus, securityManager, appName, basePath, startTime = startTime) | ||
| None, conf, listenerBus, securityManager, appName, basePath, | ||
| lastUpdateTime = lastUpdateTime, startTime = startTime) | ||
|
|
||
| val listenerFactories = ServiceLoader.load(classOf[SparkHistoryListenerFactory], | ||
| Utils.getContextOrSparkClassLoader).asScala | ||
|
|
@@ -204,6 +207,7 @@ private[spark] object SparkUI { | |
| appName: String, | ||
| basePath: String = "", | ||
| jobProgressListener: Option[JobProgressListener] = None, | ||
| lastUpdateTime: Long = -1L, | ||
| startTime: Long): SparkUI = { | ||
|
|
||
| val _jobProgressListener: JobProgressListener = jobProgressListener.getOrElse { | ||
|
|
@@ -226,6 +230,6 @@ private[spark] object SparkUI { | |
|
|
||
| new SparkUI(sc, conf, securityManager, environmentListener, storageStatusListener, | ||
| executorsListener, _jobProgressListener, storageListener, operationGraphListener, | ||
| appName, basePath, startTime) | ||
| appName, basePath, lastUpdateTime, startTime) | ||
| } | ||
| } | ||
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
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
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
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.
this is unrelated and unnecessary
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.
Since i have changed
taskDurationbelow,if do not add()here a compiler error will occur.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.
odd, I thought for sure it'd be fine, then this LGTM
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.
Thanks @ajbozarth
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.
Here what if we call the REST API on history server to get stage info? Looks like we may still have this issue since we don't have last update time here, what do you think @ajbozarth ?
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.
You are right, @jerryshao .IIUC, the
uiinAllStagesResource.scalais passed fromApiRootResourcewhich also createsparkUIbyFSHistoryProvider.So we can also getlastUpdateTimefrom thisuiinAllStagesResourceand pass to thetaskDurationinterface.I think it is another problem for REST?Should we fix here?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.
Yes, if it is not a big change I think it should be fixed here. Because currently with this fix UI and REST API are inconsistent.