cuibo01 commented on pull request #16745:
URL: https://github.com/apache/flink/pull/16745#issuecomment-894983624


   > @cuibo01 I guess we have two questions here:
   > 
   > 1. How to get the user name.
   > 2. Whether user name should be a table-level or session-level setting.
   > 
   > For 1st question, I noticed hive supports pluggable 
`HiveAuthenticationProvider` to do it and by default it uses current UGI. If we 
really want to follow Hive's behavior, we need to read 
`HiveAuthenticationProvider` configurations from `HiveConf` and create 
`HiveAuthenticationProvider` instances via reflection. But I think we should do 
that only if there's strong need for different `HiveAuthenticationProvider` 
implementations. For now, we can just use UGI.
   > 
   > For 2nd question, I think the setting should be bound to a `HiveCatalog` 
instance and thus is session-level, which is also in line with Hive itself. 
This is to avoid the scenario where a single `HiveCatalog` can create tables 
with different user identities.
   
   for 1 question, u are right. in secure cluster, hive has `UGI Authenticator` 
and `Session Config Authenticator`, so hive can obtain the owner from UGI or 
SessionConfig. and the current patch can obtain the owner from UGI or 
calalogTable#Options
   
   for 2 question, we can set `user.name` before creating the hiveconf of 
`HiveCatalog` instance, and then we dont need `PROPERTIES_PREFIX `. @Airblader 


-- 
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: issues-unsubscr...@flink.apache.org

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


Reply via email to