saihemanth-cloudera commented on code in PR #6205:
URL: https://github.com/apache/hive/pull/6205#discussion_r2594159605
##########
ql/src/java/org/apache/hadoop/hive/ql/security/authorization/plugin/metastore/HiveMetaStoreAuthorizer.java:
##########
@@ -99,24 +91,7 @@ public static Map<String, Object> getClientConfig() {
return cConfig.get();
}
- private static final ThreadLocal<Configuration> tConfig = new
ThreadLocal<Configuration>() {
-
- @Override
- protected Configuration initialValue() {
- return null;
- }
- };
-
- private static final ThreadLocal<HiveMetastoreAuthenticationProvider>
tAuthenticator = new ThreadLocal<HiveMetastoreAuthenticationProvider>() {
- @Override
- protected HiveMetastoreAuthenticationProvider initialValue() {
- try {
- return (HiveMetastoreAuthenticationProvider)
HiveUtils.getAuthenticator(tConfig.get(),
HiveConf.ConfVars.HIVE_METASTORE_AUTHENTICATOR_MANAGER);
- } catch (HiveException excp) {
- throw new IllegalStateException("Authentication provider instantiation
failure", excp);
- }
- }
- };
+ private static final ThreadLocal<HiveAuthenticationProvider> tAuthenticator
= ThreadLocal.withInitial(() -> null);
Review Comment:
The initial value is not null for tAuthenticator right?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]