解决hive元数据存储乱码:
在hive的元数据库中执行如下语句:
alter table COLUMNS_V2 modify column COMMENT varchar(256) character set utf8;
alter table TABLE_PARAMS modify column PARAM_VALUE varchar(4000) character set utf8;
alter table PARTITION_PARAMS modify column PARAM_VALUE varchar(4000) character set utf8;
alter table PARTITION_KEYS modify column PKEY_COMMENT varchar(4000) character set utf8;
alter table INDEX_PARAMS modify column PARAM_VALUE varchar(4000) character set utf8;
alter table dbs modify column DESC
varchar(4000) character set utf8;
hive配置中搜索:
javax.jdo.option.ConnectionURL
增加值:
jdbc:mysql://IP:3306/db_name?useUnicode=true&characterEncoding=UTF-8