Wednesday, April 3, 2013

How to recover from errors in Hive interactive mode

Lately, working with a team offshore on the same instance of Hive, I would get errors like:

hive> show tables;
FAILED: Error in metadata: java.lang.RuntimeException: Unable to instantiate org.apache.hadoop.hive.metastore.HiveMetaStoreClient
FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask
hive> select count(*) from json_topic1;                                                                                                         FAILED: SemanticException Unable to fetch table json_topic1          

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 <RunJarprocessId> command


Post a Comment

Note: Only a member of this blog may post a comment.