FAILED: Error in metadata: java.lang.RuntimeExcept

2020-02-26 13:19发布

I shutdown my HDFS client while HDFS and hive instances were running. Now when I relogged into Hive, I can't execute any of my DDL Tasks e.g. "show tables" or "describe tablename" etc. It is giving me the error as below

ERROR exec.Task (SessionState.java:printError(401)) - FAILED: Error in metadata: java.lang.RuntimeException: Unable to instantiate org.apache.hadoop.hive.metastore.HiveMetaStoreClient
org.apache.hadoop.hive.ql.metadata.HiveException: java.lang.RuntimeException: Unable to instantiate org.apache.hadoop.hive.metastore.HiveMetaStoreClient

Can anybody suggest what do I need to do to get my metastore_db instantiated without recreating the tables? Otherwise, I have to duplicate the effort of creating the entire database/schema once again.

8条回答
SAY GOODBYE
2楼-- · 2020-02-26 13:48

I also was facing the same problem, and figured out that I had both hive-deafult.xml and hive-site.xml(created manually by me),

I moved my hive-site.xml to hive-site.xml-template(as I was not needed this file) then started hive, worked fine.

Cheers, Ajmal

查看更多
走好不送
3楼-- · 2020-02-26 13:51

I was told that generally we get this exception if we the hive console not terminated properly. The fix:

Run the jps command, look for "RunJar" process and kill it using kill -9 command

查看更多
登录 后发表回答