配置hive的常见出错总结

1. Hive metastore database is not initialized.

Exception in thread "main" java.lang.RuntimeException: Hive metastore database is not initialized. Please use schematool (e.g. ./schematool -initSchema -dbType ...) to create the schema. If needed, don't forget to include the option to auto-create the underlying database in your JDBC connection string (e.g. ?createDatabaseIfNotExist=true for mysql)

报错解决:

在hive的bin目录下执行:./schematool -dbType mysql -initSchema


2.Exception in thread "main" java.lang.IllegalArgumentException: java.net.URISyntaxException: Relative path in absolute URI: ${system:java.io.tmpdir%7D/$%7Bsystem:user.name%7D


解决方案如下:
1.
查看hive-site.xml配置,会看到配置值含有"system:java.io.tmpdir"的配置项
2.在hive目录下
新建文件夹iotmp
3.将含有"system:java.io.tmpdir"的配置项的值修改为如上地址
启动hive,成功!


3.The specified datastore driver ("com.mysql.jdbc.Driver") was not found in the CLASSPATH

解决方法:

将mysql-connector-java-5.1.37/mysql-connector-java-5.1.37-bin.jar放在$HIVE_HOME/lib

注意:mysql-connector-java-version-bin.jar的version(版本)不能太低,我试过5.1.7 版本,即使把jar放在lib下也会报错


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值