sam-an-cloudera commented on pull request #1385:
URL: https://github.com/apache/hive/pull/1385#issuecomment-683950735


   > @sam-an-cloudera initialValue() return type was Configuration and is now 
HiveConf which is a sub-class of Configuration. Was there a reason for this 
change? It would be more appropriate that the return type be Configuration. 
Thoughts?
   
   It was mainly to avoid having to cast. The config used in 
createHiveMetastoreAuthorizer( ) method is required to be a HiveConf, the 
createHiveAuthorizer( ) call in particular. If we keep it as Configuration, 
then down there we have to do a cast, which is not good style, so I changed the 
original to HiveConf. 
   
   HiveConf hiveConf = tConfig.get();
       if(hiveConf == null){
         HiveConf hiveConf1 = new HiveConf(super.getConf(), HiveConf.class); 
<==If I don't change, then here would need a cast. 
         tConfig.set(hiveConf1);
         hiveConf = hiveConf1;
       }


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscr...@hive.apache.org
For additional commands, e-mail: gitbox-h...@hive.apache.org

Reply via email to