-
Notifications
You must be signed in to change notification settings - Fork 29.3k
[SPARK-16986][WEB-UI] Converter Started, Completed and Last Updated to client time zone in history page #19640
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
11 commits
Select commit
Hold shift + click to select a range
17bddef
Replace GMT with history server side TimeZone.
wangyum c7339c8
Support configure time zone.
wangyum f36023a
Move getTimeZone from SparkHadoopUtil to Util
wangyum 5291d16
getTimeZone -> getHistoryServerTimeZone
wangyum d9994ea
Add "spark.history.timeZone" to internal/config.
wangyum 7b04e08
Only convert the UI part to client time zone
wangyum 9a40da0
padZeroes
wangyum cb1db11
Show local time zone
wangyum 4a78965
Fix HistoryServerSuite test error
wangyum 40ec67e
Intl.DateTimeFormat().resolvedOptions().timeZone
wangyum 08f5e68
Intl.DateTimeFormat().resolvedOptions().timeZone
wangyum 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
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 |
|---|---|---|
|
|
@@ -26,7 +26,7 @@ import java.nio.ByteBuffer | |
| import java.nio.channels.{Channels, FileChannel} | ||
| import java.nio.charset.StandardCharsets | ||
| import java.nio.file.{Files, Paths} | ||
| import java.util.{Locale, Properties, Random, UUID} | ||
| import java.util.{Locale, Properties, Random, TimeZone, UUID} | ||
| import java.util.concurrent._ | ||
| import java.util.concurrent.atomic.AtomicBoolean | ||
| import java.util.zip.GZIPInputStream | ||
|
|
@@ -2742,6 +2742,11 @@ private[spark] object Utils extends Logging { | |
| } | ||
| } | ||
|
|
||
| def getTimeZone: TimeZone = { | ||
| val sparkConf = new SparkConf(false).loadFromSystemProperties(true) | ||
|
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. Can we make SparkConf as a input param instead of create a new instance for every function call? |
||
| TimeZone.getTimeZone(sparkConf.get("spark.history.timeZone", "GMT")) | ||
| } | ||
|
|
||
| } | ||
|
|
||
| private[util] object CallerContext extends Logging { | ||
|
|
||
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.
Could you please image that this method will be used outside scope of the current issue?
What's about users who does not have spark history at all?
The name of method, the class and the package does not tell us that this method somehow related ONLY to history server, such API makes me easy to do wrong assumptions.