赞
踩
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.解决
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。