facing hive query error on show databases query - Unable to instantiate

118 Views Asked by At

I initialized hive and its worked, later I gave SHOW DATABASES command, but I got below error.

I am using mysql for metadata.

adminn@master:~$ hive

Hive Session ID = e9e9145a-0c38-4007-a9af-ded86a4226ea



Logging initialized using configuration in jar:file:/home/adminn/apache-hive-3.1.1-bin/lib/hive-common-3.1.1.jar!/hive-log4j2.properties Async: true

Hive-on-MR is deprecated in Hive 2 and may not be available in the future versions. Consider using a different execution engine (i.e. spark, tez) or using Hive 1.X releases.

hive> show databases;

FAILED: HiveException java.lang.RuntimeException: Unable to instantiate org.apache.hadoop.hive.ql.metadata.SessionHiveMetaStoreClient


1

There are 1 best solutions below

0
Salva On

I added the below property to the hive-site.xml file, and this resolved the issue.

<property>
  <name>javax.jdo.option.ConnectionDriverName</name>
  <value>com.mysql.jdbc.Driver</value>
</property>