Created 07-04-2018 04:47 AM
I am using Ranger 0.7.0 on cluster. I have enabled the Ranger plugin and hive, hdfs plugins. When I was login to the hive through beeline to check that the policy is working or not, that time I have use the ' show databases' query and it does not show any database. There is a empty list of dbs. If I disable the plugins then all it gave the list of databases.
Created 07-04-2018 08:21 AM
Created 07-04-2018 08:33 AM
@Gonçalo Cunha I have checked , I have given all the access for all database ,all coloum , all tables to the user still there is a same issue.
Created 07-04-2018 08:51 AM
Can you open 2 windows one with a hive CLI and the other with beeline.
On the hive CLI run a create databases i.e
hive> create database test1; OK Time taken: 28.399 seconds hive> create database test2; OK Time taken: 0.111 seconds
Then on the beeline CLI run the show db
$ beeline beeline> ! connect jdbc:hive2://{hive_host_server}:10000/;principal=hive/{hive_host_server}@{REALM} Connecting to jdbc:hive2://{hive_host_server}:10000/;principal=hive/{hive_host_server}@{REALM} Enter username for jdbc:hive2://{hive_host_server}:10000/;principal=hive/{hive_host_server}@{REALM}: hive Enter password for jdbc:hive2://{hive_host_server}:10000/;principal=hive/{hive_host_server}@{REALM}: **** Connected to: Apache Hive (version 1.2.1000.2.6.2.0-205) Driver: Hive JDBC (version 1.2.1000.2.6.2.0-205) Transaction isolation: TRANSACTION_REPEATABLE_READ 0: jdbc:hive2://{hive_host_server}:10000/> show databases;
Are you able to see the need databases in beeline?
Created 07-04-2018 09:11 AM
@Geoffrey Shelton Okot I have done this also, I have open 2 windows hive cli and beeline (beeline UN: hive, pass:hive). But I can not see any database when I used ' show databases'. Now I have disabled the plugin then it showed all databases.
Created 07-04-2018 09:12 AM
Have you created a test database and the show databases from beeline doesn't show the newly created databases?
Can you share a screenshot of your ranger policies?
Created 07-04-2018 11:09 AM
@Geoffrey Shelton Okot Yes I have created test databases and show databases from beeline doesn't show newly created databases also.
sc11.png in this screenshot I have created test databases on hive. On hive it's working fine.
sc2.png in this I have used 'show databases' query on beeline. It gave empty list.
Beeline does not work.
I have created DB on beeline also and again hit the query ' show databases' still it does not show any DB.
Created 07-04-2018 11:55 AM
Created 07-04-2018 12:14 PM
Created 07-04-2018 12:34 PM
I see the below databases, can we do a test with for example user anjali database testh3.db
pradeep user_rwadata_salesforce_persistentsysuatcs92.db ganesh trail_exchagne_headers.db anjali testh1.db,testh2.db,testh3.db hive testh4.db
In ranger UI create a policy like (see beeline.jpg) below and try accessing it through beeline and revert.
Created on 07-05-2018 04:45 AM - edited 08-18-2019 02:25 AM
@geoffrey Shelton Okot I have created ranger policy as you said. I gave all access to the Anjali user. I tried to access through hive. the result is, when I hit query ' use testh3;' no error. But when I hit query ' show tables;' then there is empty list(NO tables found).