hive中创建表失败

使用create table命令创建表失败,如下错误信息:

hive> create table test(id int,name string,age int,sex string);
FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask. MetaException(message:Could not create "increment"/"table" value-generation container `SEQUENCE_TABLE` since autoCreate flags do not allow it. )

原因:

元数据库mysql中变量binlog_format的值为STATEMENT。

解决方法 :

修改binlog_format的默认值,

在mysql的配置文件/etc/my.cnf中添加 binlog_format="MIXED" ,重启mysql,再启动 hive即可。

再次创建表如下:

原文地址:https://www.cnblogs.com/30go/p/7211559.html