Hive之FAILED: Unable to instantiate org.apache.hadoop.hive.ql.metadata.SessionHiveMetaStoreClient异常

一.场景

  Hive启动不报错,当使用show functions;或create table...时报:FAILED: SemanticException org.apache.hadoop.hive.ql.metadata.HiveException: java.lang.RuntimeException: Unable to instantiate org.apache.hadoop.hive.ql.metadata.SessionHiveMetaStoreClient异常。

二.解决方案

  方法1.Hive元数据库未初始化

    进入Hive目录Hive/bin,执行命令:schematool -dbType -initSchema mysql

    执行结果:

      Hive之FAILED:  Unable to instantiate org.apache.hadoop.hive.ql.metadata.SessionHiveMetaStoreClient异常

      启动Hive

      Hive之FAILED:  Unable to instantiate org.apache.hadoop.hive.ql.metadata.SessionHiveMetaStoreClient异常

    表示异常已解决!

  方法2.metastore服务未启动

    执行命令:hive --service metastore & ,接着按Ctrl+C

    结果: 

      Hive之FAILED:  Unable to instantiate org.apache.hadoop.hive.ql.metadata.SessionHiveMetaStoreClient异常

     启动Hive    

      Hive之FAILED:  Unable to instantiate org.apache.hadoop.hive.ql.metadata.SessionHiveMetaStoreClient异常

    表示异常已解决!

上一篇:[转]spring security的原理及教程


下一篇:bzoj 1604 [Usaco2008 Open]Cow Neighborhoods 奶牛的邻居(set+并查集)