HIVE-29635: HS2 WebUI "Start Time" shows current time on every refresh#6513
Open
magnuma3 wants to merge 1 commit into
Open
HIVE-29635: HS2 WebUI "Start Time" shows current time on every refresh#6513magnuma3 wants to merge 1 commit into
magnuma3 wants to merge 1 commit into
Conversation
|
deniskuzZ
reviewed
May 29, 2026
| when(cli.getSessionManager()).thenReturn(sessionManager); | ||
|
|
||
| long before = System.currentTimeMillis(); | ||
| Thread.sleep(1000); |
Member
There was a problem hiding this comment.
why not just compare builder startcode with one set in root conf object?
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.



HIVE-29635
What changes were proposed in this pull request?
Move
hiveConf.set("startcode", ...)to beforebuilder.setConf(hiveConf)inHiveServer2#createHttpServerBuilder. One-line move.Why are the changes needed?
HttpServer.Builder#setConf defensively copies the conf into the servlet context. The previous code wrote startcode after the copy, so the JSP reading from the copy never saw it and fell through to its System.currentTimeMillis() default — making the WebUI "Start Time" advance on every refresh.
Does this PR introduce any user-facing change?
Yes. WebUI "HiveServer2 Start Time" now shows the actual server start time and stays stable across refreshes.
How was this patch tested?