FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask.

修改数据库derby为MySQL后,建表出错:

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默认的是iso8859(latin1)

解决方法:

(1)进入到MySQL中

MariaDB [(none)]> show databases;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| hive               |
| mysql              |
| performance_schema |
| test               |
+--------------------+
5 rows in set (0.36 sec)

(2)删去hive库

MariaDB [(none)]> drop database hive;
Query OK, 18 rows affected (0.11 sec

(3)手动新建hive库,手动指定编码为latin1

MariaDB [(none)]> create database hive charset latin1;
Query OK, 1 row affected (0.00 sec)

(4)重启hive

这下在hive中建表就没问题了

 

你可能感兴趣的:(大数据)