当前位置:   article > 正文

CDH安装hive报错:Failed to Create Hive Metastore Database Tables.

failed to create hive metastore database tables

一、    问题描述

CDH集群,添加hive组件的时候,失败报错,具体信息如下:

  1. Fri Jun  7 09:50:10 CST 2019
  2. Current working directory: /run/cloudera-scm-agent/process/39-hive-metastore-create-tables
  3. Launching one-off process: /usr/lib64/cmf/service/hive/hive.sh create_metastore_tables
  4. Fri Jun  7 09:50:10 CST 2019
  5. JAVA_HOME=/usr/java/jdk1.7.0_67-cloudera
  6. using /usr/java/jdk1.7.0_67-cloudera as JAVA_HOME
  7. using 5 as CDH_VERSION
  8. using /opt/cloudera/parcels/CDH-5.15.2-1.cdh5.15.2.p0.3/lib/hive as HIVE_HOME
  9. using /run/cloudera-scm-agent/process/39-hive-metastore-create-tables as HIVE_CONF_DIR
  10. using /opt/cloudera/parcels/CDH-5.15.2-1.cdh5.15.2.p0.3/lib/hadoop as HADOOP_HOME
  11. using /run/cloudera-scm-agent/process/39-hive-metastore-create-tables/yarn-conf as HADOOP_CONF_DIR
  12. CONF_DIR=/run/cloudera-scm-agent/process/39-hive-metastore-create-tables
  13. CMF_CONF_DIR=/etc/cloudera-scm-agent
  14. Metastore connection URL:     jdbc:mysql://i-qetdq0bw:3306/hive?useUnicode=true&characterEncoding=UTF-8
  15. Metastore Connection Driver :     com.mysql.jdbc.Driver
  16. Metastore connection User:     hive

具体如下


二、问题原因

安装Hive,或oozie的时,因为使用MySql作为hive(oozie)的元数据存储,而hive(oozie)默认没有带mysql的驱动,所以会报错。需要添加mysql驱动文件。

三、解决

1.    把mysql的jar包拷贝到/usr/share/java/

  1. mkdir /usr/share/java/
  2. cp /opt/softwares/mysql-connector-java-5.1.39-bin.jar /usr/share/java/
  3.     
  4. 修改名字
  5. mv mysql-connector-java-5.1.39-bin.jar mysql-connector-java.jar
  6. chmod 777 ./*

2.解决

 

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/小蓝xlanll/article/detail/484017
推荐阅读
相关标签
  

闽ICP备14008679号