hive 元数据库报错问题

1. 正常进入hive,执行show databases,报错如下:

Failed with exception java.io.IOException:java.lang.IllegalArgumentException: java.net.URISyntaxException: Relative path in absolute URI: ${system:user.name%7D

解决办法,在hive-site.xml里增加property  system:user.name 指定好一个值,例如:root或hive

2. create table 报错:

FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask. MetaException(message:For direct MetaStore DB connections, we don't support retries at the client level.)

解决办法:

  • 第一步:删除元数据库hive,drop database hive;
  • 第二部:重新创建hive,或者启动hive程序自动创建,但这个时候可能会报另一个错误,我们需要执行hive数据库初始化脚本

schematool -dbType mysql -initSchema

Metastore connection URL: jdbc:mysql://node4:3306/hive?createDatabaseIfNotExist=true

Metastore Connection Driver : com.mysql.jdbc.Driver

Metastore connection User: root

Starting metastore schema initialization to 1.2.0

Initialization script hive-schema-1.2.0.mysql.sql

Initialization script completed

schemaTool completed


你可能感兴趣的:(hadoop)