本文主要是介绍CDH安装hive报错:Failed to Create Hive Metastore Database Tables.,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
一、 问题描述
CDH集群,添加hive组件的时候,失败报错,具体信息如下:
Fri Jun 7 09:50:10 CST 2019
Current working directory: /run/cloudera-scm-agent/process/39-hive-metastore-create-tables
Launching one-off process: /usr/lib64/cmf/service/hive/hive.sh create_metastore_tables
Fri Jun 7 09:50:10 CST 2019
JAVA_HOME=/usr/java/jdk1.7.0_67-cloudera
using /usr/java/jdk1.7.0_67-cloudera as JAVA_HOME
using 5 as CDH_VERSION
using /opt/cloudera/parcels/CDH-5.15.2-1.cdh5.15.2.p0.3/lib/hive as HIVE_HOME
using /run/cloudera-scm-agent/process/39-hive-metastore-create-tables as HIVE_CONF_DIR
using /opt/cloudera/parcels/CDH-5.15.2-1.cdh5.15.2.p0.3/lib/hadoop as HADOOP_HOME
using /run/cloudera-scm-agent/process/39-hive-metastore-create-tables/yarn-conf as HADOOP_CONF_DIR
CONF_DIR=/run/cloudera-scm-agent/process/39-hive-metastore-create-tables
CMF_CONF_DIR=/etc/cloudera-scm-agent
Metastore connection URL: jdbc:mysql://i-qetdq0bw:3306/hive?useUnicode=true&characterEncoding=UTF-8
Metastore Connection Driver : com.mysql.jdbc.Driver
Metastore connection User: hive
具体如下
二、问题原因
安装Hive,或oozie的时,因为使用MySql作为hive(oozie)的元数据存储,而hive(oozie)默认没有带mysql的驱动,所以会报错。需要添加mysql驱动文件。
三、解决
1. 把mysql的jar包拷贝到/usr/share/java/
mkdir /usr/share/java/
cp /opt/softwares/mysql-connector-java-5.1.39-bin.jar /usr/share/java/修改名字
mv mysql-connector-java-5.1.39-bin.jar mysql-connector-java.jar
chmod 777 ./*
2.解决
这篇关于CDH安装hive报错:Failed to Create Hive Metastore Database Tables.的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!