hive建表报错:Specified key was too long; max key length is 767 bytes,hadoophive
情况描述
Hive建表时报错,元数据存储在mysql中。
报错信息
如下:
FAILED: Execution Error, return code from org.apache.hadoop.hive.ql.exec.DDLTask. MetaException(message:javax.jdo.JDODataStoreException: An exception was thrown while adding/validating class(es) : Specified key was too long; max key length is bytes
com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Specified key was too long; max key length is bytes
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:)
at java.lang.reflect.Constructor.newInstance(Constructor.java:)
at com.mysql.jdbc.Util.handleNewInstance(Util.java:)
at com.mysql.jdbc.Util.getInstance(Util.java:)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:)
at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:)
at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:)
at com.mysql.jdbc.StatementImpl.execute(StatementImpl.java:)
at com.mysql.jdbc.StatementImpl.execute(StatementImpl.java:)
at com.jolbox.bonecp.StatementHandle.execute(StatementHandle.java:)
解决方法:
修改数据库编码,在mysql机器的上命令行中运行:
alter database hive character set latin1;
hive建表报错:Specified key was too long; max key length is 767 bytes,hadoophive的更多相关文章
- hive mysql元数据,报错 Specified key was too long; max key length is 767 bytes
Specified key was too long; max key length is 767 bytes 此错误为hive 元数据mysql 字符集编码问题 如 show create tabl ...
- hive报错: Specified key was too long; max key length is 767 bytes
废话不多说,报错如下: DataNucleus.Datastore (Log4JLogger.java:error(115)) - An exception was thrown while addi ...
- Hive集成Mysql作为元数据时,提示错误:Specified key was too long; max key length is 767 bytes
在进行Hive集成Mysql作为元数据过程中.做全然部安装配置工作后.进入到hive模式,运行show databases.运行正常,接着运行show tables:时却报错. 关键错误信息例如以下: ...
- laravel migrate时报错:Syntax error or access violation: 1071 Specified key was too long; max key length is 767 bytes
今天在学习laravel的路由模型绑定时,在按照文档执行php artisan migrate时报错. In Connection.php line 664: SQLSTATE[42000]: Syn ...
- 导入sql文件报错:1071 Specified key was too long; max key length is 767 bytes
ref: https://stackoverflow.com/questions/1814532/1071-specified-key-was-too-long-max-key-length-is-7 ...
- hive异常:创建MySQL时Specified key was too long; max key length is 1000 bytes
2015-11-13 14:44:44,681 ERROR [main]: DataNucleus.Datastore (Log4JLogger.java:error(115)) - An excep ...
- 【laravel5.4】php artisan migrate报错:Specified key was too long; max key length is 767 bytes
1.原因:在进行 迁移文件生成时,程序并未给varchar类型字段设置 合适的长度,导致报错. 2.解决办法:找到database/ 目标迁移文件,修改其中类型为string的字段长度,建议不要超过2 ...
- 在hive执行创建表的命令,遇到异常com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Specified key was too long; max key length is 767 bytes
今天在练习hive的操作时,在创建数据表时,遇到了异常 FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.ex ...
- flask建表遇到的错误: flask,sqlalchemy.exc.OperationalError: (MySQLdb._exceptions.OperationalError) (1071, 'Specified key was too long; max key length is 767 bytes')
error:flask,sqlalchemy.exc.OperationalError: (MySQLdb._exceptions.OperationalError) (1071, 'Specifie ...
随机推荐
- php curl函数采集网页出现gzip压缩、编码不同导致的乱码 图文解决方法
方法一: header("content-type:text/html;charset=utf-8");$url="http://115.47.116.10/rest/k ...
- set_include_path和get_include_path用法详解
首先set_include_path这个函数呢,是在脚本里动态地对PHP.ini中include_path进行修改的.而这个include_path呢,它可以针对下面的include和require的 ...
- JSX设置CSS样式详解
JSX设置CSS样式详解 1. 使用className设置样式(CSS的其他选择器也是同理) (1)定义一个CSS文件style.css,和普通CSS一样定义class选择器 .sty1{//和普通C ...
- MySql中的约束
mysql中的约束使用和oracle使用差别不大. 1.主键约束 如同人对应身份证,主键能够唯一地标识表中的一条记录,可以结合外键来定义数据表之间的关系. 主键约束要求主键列的数据唯一,并且不允许为空 ...
- 移动端页面:viewport与分辨率的坑
<meta name="viewport" content="width=device-width, user-scalable=no"> < ...
- Django——邮件发送
在settings中添加关键信息 EMAIL_HOST = 'smtp.qq.com' #不同的邮箱有不同的发件地址(收件地址) EMAIL_PORT = 25 #smtp端口号 EMAIL_HOST ...
- 【网站seo优化】SEO优化每天的工作内容是什么?
[网站seo优化]SEO优化每天的工作内容是什么?从未知的领域来到seo,感到搜索引擎无比神奇,接触seo久了,有每天必做的工作内容,大量的seo从业者,每天的工作内容大同小异,主要做的工作有通过相应 ...
- IDEA15 创建javaweb 并配置Tomcat(转)
1.打开IDEA选择Web Application 2.在WEB-INF下创建如图两个文件夹 3.在右上角找到这个,准备配置Tomcat 4.在弹出的窗口里像这样配置LocaleHost 5.设置好本 ...
- Nand_ECC_校验和纠错_详解
word下载 ECC的全称是Error Checking and Correction,是一种用于Nand的差错检测和修正算法.如果操作时序和电路稳定性不存在问题的话,NAND Flash出错的时候一 ...
- HTML自学笔记
HTML自学笔记 1.HTML Hyper Text Markup Language 超文本标记语言 超文本:比普通文本更加强大,可以添加各种样式 标记语言:通过一组标签来对内容进行描述. 标签:&l ...