Failed: metadata error: Java Lang.runtimeexception: unable to instantiate org apache. hadoop. hive. metastore. HiveMetaStoreClient

I closed my HDFS client while HDFS and hive instances were running Now, when I re-enter hive, I cannot perform any DDL tasks, such as "show tables" or "describe tablename" It gives the following error

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

Anyone can suggest what I need to do to implement my Metastore_ DB instantiation without recreating the table? Otherwise, I have to repeat the creation of the entire database / schema again

Solution

I have solved the problem These are the steps I follow:

>Go to $hive_ HOME / bin / Metastore_ DB > dB Copy Lck to DB Lck1, dbex Copy Lck to dbex Lck1 > from DB Lck and dbex The lock entry > log out of the hive shell and all running HDFS instances > log in to HDFS and hive shell again has been deleted in Lck If you run the DDL command, it may give you "failed to instantiate hivemetastoreclient error" again > now dB Lck1 copy back to DB Lck and dbex Copy lck1 to dbex Lck > log out of all hive shells and HDFS instances > relogin, you should see your old table

Note: Step 5 may seem a little strange, because even if the lock entry is deleted, it will still give hivemetastoreclient error, but it is useful to me

Advantage: you don't have to re - create the entire database

I hope it helps someone face the same mistake If you find it useful, please vote thank you

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>