当前位置: 代码迷 >> 综合 >> hive启动失败READ COMMITTED, hive创建表失败org.apache.hadoop.hive.ql.exec.DDLTask. MetaException问题总结
  详细解决方案

hive启动失败READ COMMITTED, hive创建表失败org.apache.hadoop.hive.ql.exec.DDLTask. MetaException问题总结

热度:69   发布时间:2024-02-12 10:35:13.0

hive元数据使用mysql,发现hive启动和在hive中创建表失败的BUG。


启动失败报错提示:
Caused by: java.sql.SQLException: Cannot execute statement: impossible to write to binary log since BINLOG_FORMAT = STATEMENT and at least one table uses a storage engine limited to row-based logging. InnoDB is limited to row-logging when transaction isolation level is READ COMMITTED or READ UNCOMMITTED.

创建表失败:
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.)


原始是配置元数据库mysql不当造成的错误。

解决方法:

  1. 在数据库中修改hive库的编码格式。
root ~]# mysql -u root -prootmysql> drop databases hive;
mysql> create database hive;
mysql> alter database hive character set latin1;
  1. 编辑my.cnf文件
    vim /usr/my.cnf
    添加
    binlog_format=mixed

  2. 重启mysql服务和hive
    service mysql restart
    sh hive
    即可。

  相关解决方案