HiveServer2-JDBC中文支持

1
2
3
4
5
6
7
8
export LANG=en_US.UTF-8
export HADOOP_OPTS="$HADOOP_OPTS -Dfile.encoding=UTF-8"

[[email protected] ~]$ sudo vi /opt/cloudera/parcels/CDH/lib/hive/bin/hiveserver2 #实际调用的hive脚本
[[email protected] ~]$ sudo vim /opt/cloudera/parcels/CDH/lib/hive/bin/hive
. "$bin"/hive-config.sh #放到执行了hive-config脚本之后
export LANG=en_US.UTF-8
export HADOOP_OPTS="$HADOOP_OPTS -Dfile.encoding=UTF-8"