Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

hive running query from different user but user name is same

avatar
Rising Star

HI Team,

I have three node Cluster. I have enabled kerberos in cluster environment. While i'm running any hive query from different users, I'm getting only hive username in history server username who is running query.

How can i enable owner name in application?

sample screenshot attached.

Regards,

Vinay

capture1.png

1 ACCEPTED SOLUTION

avatar

@Vinay K You need to enable user impersonation in hive configuration. Set hive.server2.enable.doAs = true save and restart hive server2. When doAs is set to false, queries execute as the Hive user and not the end user. Setting it to true so that queries will be run as end user instead.

In ambari you can do this change in Hive > Configs > Settings >

76635-screen-shot-2018-06-12-at-83325-am.png

HTH

*** If you found this answer addressed your question, please take a moment to login and click the "accept" link on the answer.

View solution in original post

4 REPLIES 4

avatar

@Vinay K You need to enable user impersonation in hive configuration. Set hive.server2.enable.doAs = true save and restart hive server2. When doAs is set to false, queries execute as the Hive user and not the end user. Setting it to true so that queries will be run as end user instead.

In ambari you can do this change in Hive > Configs > Settings >

76635-screen-shot-2018-06-12-at-83325-am.png

HTH

*** If you found this answer addressed your question, please take a moment to login and click the "accept" link on the answer.

avatar
Rising Star
@Felix Albani

It's working. Thanks for quick response.

Now i'm running query from end, I'm getting below error in hiveserver2.log

Diagnostics: Application application_1528797729105_0016 initialization failed (exitCode=255) with output: main : command provided 0 main : run as user is asif main : requested yarn user is asif User asif not found

I've configured Kerberos & ranger integrated with Active Directory. I've configured one way trust MIT KDC.

asif user have own kerberos ticket. But still asif user not found.

Can you further help me?

Thanks.

avatar
Contributor

@Vinay K

  • What is the OS you are running on.
  • Do you have OS user with the same name ?
  • Do you see hdfs directory for that user in /user/asif
  • Are you querying on internal or external hive table ?

avatar
Rising Star

@Bhanu Pamu

  • I'm using CentOS 7.3
  • No i don't any user on OS with same name. I'm using AD users.
  • Yes, I'd created asif user directory in /user.
  • I'm running query on internal hive table.