当前位置:

FAILED: HiveException java.lang.RuntimeException: Unable to instantiate org.apache.hadoop.hive.ql.me

访客 2024-01-29 803 0

当hive-site.xml以及mysql等都配置好时,格式化元数据库进入hive,仍然报未格式化元数据库的错

  • hive>showdatabases;
  • FAILED:HiveExceptionjava.lang.RuntimeException:Unabletoinstantiateorg.apache.hadoop.hive.ql.metadata.Sess
  • hive>showdatabases;
  • 第一种方法便是把元数据删除,重新格式化

    dropdatabasemetastore;schematool-initSchema-dbTypemysql

    第二种,便是上诉方法并未解决,看报错信息是metastore的原因

    可能是metastore未启动,进hive下的bin目录下

    ./hive--servicemetastore&

    一般可以解决,不能解决的可能没有用metastore服务,直接注释掉。

  • <!--<property>
  • <name>hive.metastore.uris</name>
  • <value>thrift://bigdata-study-104:9083</value>
  • <description>ThriftURIfortheremotemetastore.Usedbymetastoreclienttoconnecttoremotemetastore.</description>
  • </property>-->
  • 最后我有一种荒诞的猜想,就我本人而言可能是因为我每次进去之后第一个命令是showdatabases;我重来一遍加了启动命令

  • nohuphive--servicemetastore>/usr/local/hive/logs/metastore.log2>&1&
  • nohuphive--servicehiveserver2>/usr/local/hive/logs/hive2.log2>&1&
  • 成功了

    发表评论

    • 评论列表
    还没有人评论,快来抢沙发吧~