Hi Chi Wang, I am forwarding query to to dev and user list. Please provide the ranger build/version/distribution and HS2 build/version/distribution that you are using to help narrow down the problem.
Thanks On Tue, Jun 28, 2016 at 6:16 PM, chi.w...@56qq.com <chi.w...@56qq.com> wrote: > Hello,Alok Lal: > > > I want to ask you a question.when i use hue together with > ranger,hue can't access hive(can't see databases). > First,i can make sure that i have setuped ranger by ambari > successfully.user and group both work fine. > > Follow the steps below to make an error > *step1:* > when I create an account(user1) on hue,i login via user1 and > can't see any database(I think it's correct,because i don't give authortiy > to user1),then I will give all authority to user1. > *step2:* > first ,i give all authority to group(bigdata) by ranger'policy > > on hiveserver node: > > root@v29:~# useradd -G bigdata user1 > > root@v29:~# beeline -u jdbc:hive2://v29:10000/default -n user1 -e > "show databases" > > WARNING: Use "yarn jar" to launch YARN applications. > > Connecting to jdbc:hive2://v29:10000/default > > Connected to: Apache Hive (version 1.2.1.2.3.2.0-2950) > > Driver: Hive JDBC (version 1.2.1.2.3.2.0-2950) Transaction > isolation: TRANSACTION_REPEATABLE_READ > > +----------------------+--+ > > | database_name | > > +----------------------+--+ > > | client_business_log | > > | result | > > +----------------------+--+ > > 2 rows selected (0.229 seconds) > > authority works > > * step3:* > > i re-login hue,still can't see databases > > * step4:* > > check hiveserver2 debug log > > > > we can see "client_business_log" and "result",it indicates that > *authority > works* > > " > parse.VariableSubstitution (VariableSubstitution.java:substitute(53)) - > Substitution is on: > USE ``" * is wrong*,it should be "USE client_business_log" > > > *on the other hand,I change step.* > > step1:create a new account(user2) and give authority > > step2:create a new account(user2) on hue > > step3:login hue via user2,i can see databases(client_business_log > and result) > > step4:check hiveserver2 debug log > > > > we can see " > parse.VariableSubstitution (VariableSubstitution.java:substitute(53)) - > Substitution is on: USE ` > client_business_log`" > > > Thank you for your suggestions and I will be looking forward to > your reply! > > > ------------------------------ > Best Regards > >