HIVE-29330: HiveMetaStoreAuthorizer creating new HiveConf per thread … #6205
+43
−41
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.



…increases overhead
What changes were proposed in this pull request?
Why are the changes needed?
HiveMetaStoreAuthorizer can act as the pre event listener inside the HMS, or as the metadata filter hook on the client. If it's insides the HMS, getConf() should have loaded all properties in hive-site.xml, otherwise it contains the information to talk with the HMS at least, as the call is from client as a filter hook.
We don't need to create a new HiveConf per thread, it's wasteful and might spend dozens of milliseconds to load the properties, log the warn message "HiveConf of name xx does not exist" continuously if the property is only specified in MetastoreConf.
Does this PR introduce any user-facing change?
No
How was this patch tested?
The warn message of HiveConf doesn't exist is gone in an affected HMS