Saturday, 12 May 2018

Unable to instantiate org.apache.hadoop.hive.ql.metadata.SessionHiveMetaStoreClient

Error :   Caused by: java.lang.RuntimeException: Unable to instantiate org.apache.hadoop.hive.ql.metadata.SessionHiveMetaStoreClient

Solution: This issue is related with Metastore which will done by help of database e,g Derby, MySql etc...

First steps 
Verify hive-site.xml with below properties.

 <name>javax.jdo.option.ConnectionURL</name>
    <value>jdbc:derby:;databaseName=metastore_db;create=true</value>
   
<name>javax.jdo.option.ConnectionDriverName</name>
    <value>org.apache.derby.jdbc.EmbeddedDriver</value>
    
  <name>hive.metastore.warehouse.dir</name>
    <value>hdfs://localhost:9000/user/hive/warehouse</value>

 <property>
    <name>hive.metastore.uris</name>
    Keep it BLANK

Now try again to start HIVE.If you are still getting the same problem.

Please follow below steps:
(1) Remove metastore_db directory if exists
     rm -r metastore_db

(2) Now initiate Schema by command schematool from hive bin directory 
       schematool -initSchema -dbType derby

(3)     IF Schematool complete successfully the please start hive.
         Now you can able to use database in hive.

No comments:

Post a Comment