Skip to content

HIVE-29046: Avoid unecessary perf overhead from handling deprecated properties in MetastoreConf - #5897

Merged
zabetak merged 1 commit into
apache:masterfrom
zabetak:hms-prop-deprecation
Jul 4, 2025
Merged

zabetak merged 1 commit into
apache:masterfrom
zabetak:hms-prop-deprecation

Conversation

@zabetak

@zabetak zabetak commented Jun 25, 2025

Copy link
Copy Markdown
Member

What changes were proposed in this pull request?

  1. Move deprecated property registation in the existing static block
  2. Drop constructors and variables related to deprecated keys in ConfVars
  3. Drop DEPRECATED_TEST_ENTRY that is only useful for testing purposes and adapt existing tests

Why are the changes needed?

Improve performance & code maintenance.

Looping through ~400 ConfVars enumeration entries on every creation of a new Configuration entry is resource wasteful and unecessary. The deprecated properties are static and known at compile time so there is no reason to search and register them on every creation of a new Configuration instance. In addition, the presence of deprecation information inside the ConfVars enumeration leads to boilerplate code that is not really necessary.

Does this PR introduce any user-facing change?

No

How was this patch tested?

Existing tests

…roperties in MetastoreConf

Looping through ~400 ConfVars enumeration entries on every creation of a new Configuration entry is resource wasteful and unecessary.
The deprecated properties are static and known at compile time so there is no reason to search and register them on every creation of a new Configuration instance.
In addition, the presence of deprecation information inside the ConfVars enumeration leads to boilerplate code that is not really necessary.

1. Move deprecated property registation in the existing static block
2. Drop constructors and variables related to deprecated keys in ConfVars
3. Drop DEPRECATED_TEST_ENTRY that is only useful for testing purposes and adapt existing tests
@sonarqubecloud

Copy link
Copy Markdown

@zabetak
zabetak merged commit 171340a into apache:master Jul 4, 2025
@zabetak
zabetak deleted the hms-prop-deprecation branch July 4, 2025 13:16
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.

4 participants