[ZEPPELIN-6483] Format HDFS modification time in GMT to match the printed label - #5351
Open
dev-donghwan wants to merge 1 commit into
Open
[ZEPPELIN-6483] Format HDFS modification time in GMT to match the printed label#5351dev-donghwan wants to merge 1 commit into
dev-donghwan wants to merge 1 commit into
Conversation
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What is this PR for?
In the HDFS file interpreter,
listOne()appends a hard-codedGMTlabel to themodification time, but
listDate()formats the timestamp using the JVM defaulttime zone. On any server not running in UTC, the displayed value does not match
the label (e.g. a file modified at
2015-08-02 20:43GMT is shown as2015-08-03 05:43GMTon a KST server).This PR sets the formatter's time zone to GMT in
listDate()so the renderedvalue matches the existing label.
Why format in GMT (option A) rather than keep local time and fix the label (option B):
modificationTimeis an absolute epoch value, so the time zone is only adisplay choice. Formatting in GMT keeps the output identical regardless of the
host/JVM default zone and consistent with the label already printed.
remote-interpreter, multi-user setups ("whose local time?"), and the output
would vary per deployment, making it harder to reproduce and test.
What type of PR is it?
Bug Fix
Todos
listDate()Asia/Seoul) and asserts the value is rendered in GMT to match the labelWhat is the Jira issue?
How should this be tested?
./mvnw test -pl file -Dtest=HDFSFileInterpreterTesttestListDateFormatsInGmtToMatchLabelpins a knownmodificationTime(1438548219672 = 2015-08-02 20:43 GMT) under anAsia/Seouldefault zone and asserts the output contains2015-08-02 20:43GMT.Screenshots (if appropriate)
N/A
Questions: