Hive-0.8.1 JDBC连接中文乱码解决

找到源码中的org.apache.hadoop.hive.jdbc.HiveQueryResultSet

把代码:Object data = serde.deserialize(new BytesWritable(rowStr.getBytes()));

修改为:Object data = serde.deserialize(new BytesWritable(rowStr.getBytes("UTF-8")));

编译后,覆盖到包:hive-jdbc-0.8.1.jar

PS:先开始服务才能连接./hive --service hiveserver