Not able to connect to Hive server in Hadoop | Cloudera | Hortonworks | MapR

In this article, we will show how to resolve the hive server connection issue in the Hadoop ecosystem in Cloudera, Hortonworks, and MapR distributions.

Hive Error:

Exception in thread "main" java. lang. RuntimeException is unable to determineĀ current user
at org.apache.hadoop.conf.Configuration. $Resource. getRestriction.ParserDefault(
at org.apache.hadoop.conf.Configuration. $Resource <init>

[Solved] in MapR distribution:

We are following the below steps to solve the Hive server error issue. At the time so many jobs got failed due to the Hive server issue.

Step 1: Check MapR ticket in the edge node server for Hive. In case MapR ticket using below command

maprlogin print

After entering the above command it showing MapR ticket expires date.

Step 2: Regenerate the MapR login password in the edge node using the below command.

maprlogin password

After that asked the MapR login password then give your’s confidential password.

Step 3: To check MapR authentication test

maprlogin authtest

In case Authentication test failed then it will generate a new MapR ticket.

[Solved] in Cloudera Distribution:

Step 1: Open the edge node server then open the bashrc file

vi ~/.bashrc

Step 2: After that created following directory inside hdfs. To check the hive users are there or not.

hadoop fs -ls /user/hive

Step 3: Open MySql prompt then will create Metastore for Hive. Then enter the password.

mysql -u root -p

Step 4: Create the new database in mysql prompt

mysql > create database newhivedb

Step 5: Use created hive table in the mysql

mysql > use newhivedb

Summary: Not able to connect to the Hive server in Hadoop distribution like Cloudera, Hortonworks, and MapR. At present Cloudera and Hortonworks were merged. In MapR distribution, we checked only the MapR Authentication test in case MapR ticket is not there we need to regenerate simply. After that MapR ticket automatically connects the Hive server. Coming to Cloudera distribution we need to verify the Hive server configuration creates metastore by using MySql.