Support Questions

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

How Many User using Hive DB and Table

avatar

Hey Team,
i want to know that if i have EMP Database and in EMP WE have 1 Table so in cluster how many user is using that DB And Table want to check .

Thanks
Reg Imran Chaush 

2 REPLIES 2

avatar
Master Collaborator

@Imran_chaush If you are on CDP, and using Ranger for authorization, then you may check the audit log to see which users tried to access that specific database and table.  Else, you will have to read the raw log file to see what are the queries run on a specific table, and then try to find out the users submitting those queries.

e.g.

grep -E 'Compiling.*<table name>' /var/log/hive/hadoop-cmf-hive_on_tez-HIVESERVER2-node1.log.out

Column 5 is your session ID, and you may grep for the session ID again to find the user associated with it.

avatar
Community Manager

@Imran_chaush Has the reply helped resolve your issue? If so, please mark the appropriate reply as the solution, as it will make it easier for others to find the answer in the future. Thanks


Regards,

Diana Torres,
Community Moderator


Was your question answered? Make sure to mark the answer as the accepted solution.
If you find a reply useful, say thanks by clicking on the thumbs up button.
Learn more about the Cloudera Community: