问题1 hive库编码问题
hive加载数据报错日志为
hive> load data local inpath '/export/servers/hivedatas/score.csv' into table score2 partition(year='2018',month='06',day='01');
Loading data to table myhive.score2 partition (year=2018, month=06, day=01)
Failed with exception MetaException(message:Error(s) were found while auto-creating/validating the datastore for classes. The errors are printed in the log, and are attached to this exception.)
FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.MoveTask. MetaException(message:Error(s) were found while auto-creating/validating the datastore for classes. The errors are pri nted in the log, and are attached to this exception.)
查看hive日志hive.log
Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Specified key was too long; max key length is 3072 bytes
解决方式
把hive数据库编码改成utf-8 后再执行hive命令