----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/30487/#review70638 -----------------------------------------------------------
ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFCurrentUser.java <https://reviews.apache.org/r/30487/#comment115922> This will not work with HiveServer2 is configured with hive.server2.enable.doAs=false (the reccomended mode for sql standard authorization, apache ranger, sentry). To make it work in that mode as well, you can use SessionState.getUserFromAuthenticator(). That method is not a public api, but since this is a builtin udf, we can use that api call. The user information from this called is used for authorization and ownership information in create-table etc. - Thejas Nair On Feb. 1, 2015, 8:20 p.m., Alexander Pivovarov wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/30487/ > ----------------------------------------------------------- > > (Updated Feb. 1, 2015, 8:20 p.m.) > > > Review request for hive. > > > Bugs: HIVE-9143 > https://issues.apache.org/jira/browse/HIVE-9143 > > > Repository: hive-git > > > Description > ------- > > HIVE-9143 impl current_user() udf > > > Diffs > ----- > > ql/src/java/org/apache/hadoop/hive/ql/exec/FunctionRegistry.java > 23d77ca4cc2e2a44b62f62ddbd4826df092bcfe8 > > ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFCurrentUser.java > PRE-CREATION > ql/src/test/queries/clientpositive/udf_current_user.q PRE-CREATION > ql/src/test/results/clientpositive/show_functions.q.out > 36c8743a61c55a714352d358a5d9cc0deb4cef2c > ql/src/test/results/clientpositive/udf_current_user.q.out PRE-CREATION > shims/common/src/main/java/org/apache/hadoop/hive/shims/Utils.java > c851dc2cb28876aef77811ead397429a2338cde4 > > Diff: https://reviews.apache.org/r/30487/diff/ > > > Testing > ------- > > > Thanks, > > Alexander Pivovarov > >