Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

How to add another HiveServer for current metastore ?

Solved Go to solution

How to add another HiveServer for current metastore ?

Expert Contributor

Hello

I have a cluster (HDP 2.3.2) with one edge node serving as Hive Server (running hiveserver2). This server is used for Hive ETL processes and also for end users that query the hive databases. Because this server is very busy i want to add another edge server that will be dedicated for the ETL processes, thus ending up with one edge node for ETL processes (that insert data to Hive tables), and a different edge node that serves end users for querying the same hive tables. I've added the new host to the cluster, ran the add HiveServer2 wizard. The Amabri shows everything is up and running. When i login to the new edge node, run "beeline" and login to hive but i can't see the tables in my old hive metastore. It is as if these are two completely separate instances.

I need two different servers looking at the same Hive metastore\DB. Any ideas how can i acomplish this ?

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted

Re: How to add another HiveServer for current metastore ?

@Adi Jabkowsky

Take a look on the error logs...

ERROR [HiveServer2-Background-Pool: Thread-165]: authorizer.RangerHiveAuthorizer (RangerHiveAuthorizer.java:filterListCmdObjects(430)) - filterListCmdObjects: Internal error: null RangerAccessResult object received back from isAccessAllowed()!

12 REPLIES 12

Re: How to add another HiveServer for current metastore ?

Expert Contributor

When i'm connected to the additional hiveserver and run beeline >>> show tables i get no tables

In the log it says:

2016-11-01 12:11:59,214 INFO [HiveServer2-Background-Pool: Thread-165]: HiveMetaStore.audit (HiveMetaStore.java:logAuditEvent(372)) - ugi=adijaip=unknown-ip-addr cmd=get_tables: db=default pat=.* 2016-11-01 12:11:59,229 WARN [HiveServer2-Background-Pool: Thread-165]: security.UserGroupInformation (UserGroupInformation.java:getGroupNames(1521)) - No groups available for user adija 2016-11-01 12:11:59,230 ERROR [HiveServer2-Background-Pool: Thread-165]: authorizer.RangerHiveAuthorizer (RangerHiveAuthorizer.java:filterListCmdObjects(430)) - filterListCmdObjects: Internal error: null RangerAccessResult object received back from isAccessAllowed()!

Highlighted

Re: How to add another HiveServer for current metastore ?

@Adi Jabkowsky

Take a look on the error logs...

ERROR [HiveServer2-Background-Pool: Thread-165]: authorizer.RangerHiveAuthorizer (RangerHiveAuthorizer.java:filterListCmdObjects(430)) - filterListCmdObjects: Internal error: null RangerAccessResult object received back from isAccessAllowed()!

Re: How to add another HiveServer for current metastore ?

Expert Contributor
@Neeraj Sabharwal

@srai

Thanks for the observation, i haven't considered this as a Ranger issue because it says that Access is allowed..

Anyways - disabling Ranger plugin fixed the issue.... but i need the Ranger plugin so i could manage Hive authorizations using Ranger.

Can't i use two HiveServer2 instances while managing hive auth using Ranger ??

Re: How to add another HiveServer for current metastore ?

Guru

good catch Neeraj. You can try disabling the ranger plugin via Ambari to test if it works otherwise.

Re: How to add another HiveServer for current metastore ?

Expert Contributor

I've noticed that in the new Edge running the HiveServer2 in /etc/hive/conf/conf.server the ranger-hive-audit.xml & ranger-hive-security.xml were configured with localhost values.

Fixed the issue by setting the server name instead of localhost in Ranger settings (Ambari) (External URL, authServiceHostName etc.)

Now the new server can contact the Ranger and Hive is working. Thank you for the heads up !

Re: How to add another HiveServer for current metastore ?

New Contributor

I face the same isssue. i have 2 HS2 server. Can't i use two HiveServer2 instances while managing hive auth using Ranger ??

Re: How to add another HiveServer for current metastore ?

Expert Contributor

@suresh krish

Please see my answer just above your comment:

"Fixed the issue by setting the server name instead of localhost in Ranger settings (Ambari) (External URL, authServiceHostName etc.)"

Re: How to add another HiveServer for current metastore ?

New Contributor

may i know the property please.. which property to change.

Re: How to add another HiveServer for current metastore ?

New Contributor

i dont find any local host entry in my configuration. all i see is sever name. no local host entries

Don't have an account?
Coming from Hortonworks? Activate your account here