1. 程式人生 > >Spark連線Hive 建立表提示"Specified key was too long; max key length is 767 bytes"解決辦法

Spark連線Hive 建立表提示"Specified key was too long; max key length is 767 bytes"解決辦法

FAILED: Execution Error, return code 1 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 767 bytes
com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Specified key was too long; max key length is 767 bytes --------------------- 本文來自 keljony 的CSDN 部落格 ,全文地址請點選:https://blog.csdn.net/keljony/article/details/43371995?utm_source=copy

解決辦法:

mysql > alter database hive character set latin1;

再在Hive裡建立表已經ok了