Skip to content

HIVE-29635: HS2 WebUI "Start Time" shows current time on every refresh#6513

Open
magnuma3 wants to merge 3 commits into
apache:masterfrom
magnuma3:fix-hs2-starttime
Open

HIVE-29635: HS2 WebUI "Start Time" shows current time on every refresh#6513
magnuma3 wants to merge 3 commits into
apache:masterfrom
magnuma3:fix-hs2-starttime

Conversation

@magnuma3
Copy link
Copy Markdown

HIVE-29635

What changes were proposed in this pull request?

Move hiveConf.set("startcode", ...) to before builder.setConf(hiveConf) in HiveServer2#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?

Comment thread service/src/test/org/apache/hive/service/server/TestHiveServer2.java Outdated
@magnuma3
Copy link
Copy Markdown
Author

magnuma3 commented Jun 1, 2026

test failure is not related to this patch.

Comment thread service/src/test/org/apache/hive/service/server/TestHiveServer2.java Outdated
Copy link
Copy Markdown
Member

@deniskuzZ deniskuzZ left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1, pending tests

@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented Jun 5, 2026

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants